interact.js icon indicating copy to clipboard operation
interact.js copied to clipboard

Hints to adding .applyBounds() to codebase

Open alkhoo opened this issue 10 years ago • 1 comments

Firstly, a thank you.

This library holds potential to exceed other library like jQuery Draggable or even Green$ock API.

One of the feature I like in Green$ock is the .applyBounds() call where another process (eg: animation) moves the element out of the restrict-zone and running element.applyBounds() pushes it back to the restrict-zone. An example could be:-

  1. Animated Page Title, where text fly all over, opacity goes to 0 (fadeOut)
  2. Calls .applyBound(), moves text to the restricted zone
  3. opacity returns to 1 (fadeIn)

Question: Is there an example or HowTo in extending the interactJS correctly (eg: SnapSVG plugin() call) or even a general guideline or pointers that an extended function has to hook into InteractJS?

End of day, it could be a love child between InteractJS and https://github.com/juliangarnier/anime :-)

alkhoo avatar Aug 13 '16 18:08 alkhoo

Would be brilliant, I change the resolution of parent containers a lot in my application and have struggled with the lack of this feature.

dpekkle avatar Sep 16 '16 13:09 dpekkle