diff --git a/resources/MigrationV2to3.md b/resources/MigrationV2to3.md new file mode 100644 index 00000000..5d03f5f7 --- /dev/null +++ b/resources/MigrationV2to3.md @@ -0,0 +1,8 @@ +# Migration Guide - Telescope v2 to v3 + +This guide will cover the different breaking changes introduced in Telescope v3.0.0 + +## Removal of TLMemorizeNodePositionAction + +`TLMemorizeNodePositionAction` was an action introduced to save the positions of elements in visualization. It was removed in the v3 without replacement. This decision after trying to use it in production. The interactive property of Telescope make this feature unusable because layouts always update and will overlap with the fixed entities. + diff --git a/src/Telescope-Core/TLDrawable.class.st b/src/Telescope-Core/TLDrawable.class.st index 1bae6856..fe0d4a25 100644 --- a/src/Telescope-Core/TLDrawable.class.st +++ b/src/Telescope-Core/TLDrawable.class.st @@ -88,13 +88,6 @@ TLDrawable >> defaultStyle [ ^ #drawable ] -{ #category : #style } -TLDrawable >> effectiveStyleSheet [ - ^ self - buildCompositeStyleSheetFrom: - (self parent ifNil: [ self styleSheetClass new ] ifNotNil: [ self parent effectiveStyleSheet ]) -] - { #category : #'private-connector' } TLDrawable >> generate [ | result | diff --git a/src/Telescope-Core/TLDrawableCollection.class.st b/src/Telescope-Core/TLDrawableCollection.class.st index d3b0ac33..34155fbd 100644 --- a/src/Telescope-Core/TLDrawableCollection.class.st +++ b/src/Telescope-Core/TLDrawableCollection.class.st @@ -6,9 +6,6 @@ Class { #superclass : #OrderedCollection, #traits : 'TTLConnectable - {#connectTo:. #connectIfNotTo:. #connectTo:entity:} + TTLDrawableCollection', #classTraits : 'TTLConnectable classTrait + TTLDrawableCollection classTrait', - #instVars : [ - 'sortingStrategy' - ], #category : #'Telescope-Core-Model' } diff --git a/src/Telescope-Core/TLMemorizeNodePositionAction.class.st b/src/Telescope-Core/TLMemorizeNodePositionAction.class.st deleted file mode 100644 index 451b682a..00000000 --- a/src/Telescope-Core/TLMemorizeNodePositionAction.class.st +++ /dev/null @@ -1,19 +0,0 @@ -" -I am an action that will make the node to keep its relative position to its parent when triggered. Layout will now stop to place the node but will count it for positionning the others -" -Class { - #name : #TLMemorizeNodePositionAction, - #superclass : #TLDrawableAction, - #category : #'Telescope-Core-Actions' -} - -{ #category : #action } -TLMemorizeNodePositionAction >> actionOn: aDrawable [ - self error: 'This action can only be used with a move node action' -] - -{ #category : #action } -TLMemorizeNodePositionAction >> actionOn: aDrawable parameter: aPosition [ - (aDrawable generator elementFromTLDrawable: aDrawable) - in: [ :anElement | anElement defineFixedRelativePosition: aPosition ] -] diff --git a/src/Telescope-Demo/TLDemos.class.st b/src/Telescope-Demo/TLDemos.class.st index 94dca259..586338e6 100644 --- a/src/Telescope-Demo/TLDemos.class.st +++ b/src/Telescope-Demo/TLDemos.class.st @@ -488,22 +488,6 @@ TLDemos class >> exampleLineStyle [ ^ visualization ] -{ #category : #demos } -TLDemos class >> exampleMovingNodeChangeEntity [ - - - | visu | - visu := TLVisualization fromEntities: ((1 to: 5) collect: [ :i | (i * 20) @ (i * 20) ]). - visu - addInteractions: - {(TLCustomWithParameterAction block: [ :node :position | node entity: position x asInteger @ position y asInteger ]) onMove. - TLMemorizeNodePositionAction onMove}. - visu styleSheet - nodeLabel: #asString position: #top; - labelSize: 8. - ^ visu -] - { #category : #demos } TLDemos class >> exampleMovingNodeToAnotherGroup [