adobe-photoshop / spaces-design

Adobe Photoshop Design Space
http://adobe-photoshop.github.io/
Other
852 stars 74 forks source link

Remove modifier store dependency in superselectOverlay #3669

Closed baaygun closed 8 years ago

baaygun commented 8 years ago

Instead of relying on modifier store to render leaf bounds vs regular bounds, we should instead render all bounds and in updateMouseOverHighlights use the EXTERNAL_MOUSE_MOVE event modifiers to know which ones to highlight.

iwehrman commented 8 years ago

After looking into this a little, I'm not sure we actually want to change SuperSelectOverlay. Yes, we get modifiers on externalMouseMove events, but we also want to track this state in SuperSelectOverlay independent of move movement. For example, we want to re-render the overlay when the modifier state changes even without a mouse move event. So, to do this, we'd need to push most of the logic used to maintain the modifier store right into the overlay, which seems worse. I'm going to change LayerFace and IconBar to not rely on the modifier store (because this state is less reliable than the modifier state on click events), but I guess I think the modifier store should continue to exist for use cases like SuperSelectOverlay.

baaygun commented 8 years ago

Initial reason of modifier store was to not do what this issue is suggesting, and based on the edge case, I'm closing this issue.