PixelsCommander / Propeller

JavaScript library to rotate elements with mouse or touch gestures. Supports inertia and stepwise rotation. Optimized for better performance.
http://pixelscommander.com/polygon/propeller/
409 stars 58 forks source link

Support for Vue? #39

Closed paulm17 closed 6 years ago

paulm17 commented 6 years ago

Any chance for support for Vue?

Something like:

if (Window.Vue) {
    export {Propeller};
}

I'm doing this right now, so I can use propeller in a component for Vue.

Thanks

PixelsCommander commented 6 years ago

Would you be able to make a PR for this?

paulm17 commented 6 years ago

Sure, I'm finished up for today. But it'll submit it for tomorrow. Thanks for the quick reply!

paulm17 commented 6 years ago

I couldn't work out a way of using using export along with jQuery being present.

Also the if statement I mention above definitely does not work.

For Vue/React to be supported, a separate branch probably needs to be created and then submitted to NPM.

Unfortunately, I'm seriously busy on a project. So, I'll leave that as an exercise for you/someone else.

For now, I'm happy to do the change my end every time Propeller updates.

I'll close this for now!

Zaniyar commented 3 years ago

its not possible to use import Propeller from 'Propeller' in react? TypeError: PropellerWEBPACK_IMPORTED_MODULE1default.a is not a constructor