TelescopeSt / Telescope

Telescope is an engine for efficiently creating meaningful visualizations
MIT License
31 stars 9 forks source link

Actions condition should follow the standard of providing entity then node as block parameter #169

Closed Larcheveque closed 3 years ago

Larcheveque commented 3 years ago

The change is to do here:

generateInteractionsOf: aDrawable targetingDrawable: aTargetDrawable
    aDrawable allInteractions
        select: [ :anInteraction | anInteraction condition value: aTargetDrawable ]
        thenDo: [ :anInteraction | anInteraction generateWith: self on: aDrawable targeting: aTargetDrawable ]

should become


generateInteractionsOf: aDrawable targetingDrawable: aTargetDrawable
    aDrawable allInteractions
        select: [ :anInteraction | anInteraction condition cull: aTargetDrawable entity cull: aTargetDrawable ]
        thenDo: [ :anInteraction | anInteraction generateWith: self on: aDrawable targeting: aTargetDrawable ]
Larcheveque commented 3 years ago

non sense because action can be performed on drawables without entity