From 476c7f5bda213e35a999d6f032af6d39ddc690f0 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Mon, 8 Jul 2019 22:39:28 +0200 Subject: [PATCH] Remove TLMemorizeNodePositionAction. Fixes #101 --- src/Telescope-Core/TLDrawable.class.st | 7 ------- .../TLDrawableCollection.class.st | 3 --- .../TLMemorizeNodePositionAction.class.st | 19 ------------------- src/Telescope-Demo/TLDemos.class.st | 16 ---------------- 4 files changed, 45 deletions(-) delete mode 100644 src/Telescope-Core/TLMemorizeNodePositionAction.class.st 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 [