-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isolate all tools into separate .js files #75
Comments
i am separating the bezierToPolygon function! |
in pull request #76 you can see how to encapsulate tools like The encapsulation is not complete, and there are still references to the "draw" and "drawPolygon" tool in |
for all tools that simply require a click, this is the way to go:
and add the two according lines there
and you are done 😃 |
@katjaq are there any more tools that need extraction? I can't readily identify any remaining tools. Also, is there any desire to migrate to using ES Modules and Webpack? It seems like this issue and #59 would greatly benefit from having explicitly-listed module imports/exports in each file, and would likely make debugging/adding features easier. (Take with a grain of salt, I'm just looking through the codebase, so there's likely nuances I'm missing) |
ES module would be a godsent. Was going to make a snarky remark about the complexity of webpack, but after some mental gymnastics, I came to the conclusion that it definitely could work. If there are enough interest we could implement. |
@xgui3783 cool. I'm not sure what the unique challenges are since I haven't looked at this codebase very in-depth, but wanted to offer this as an option, since that's essentially what this is asking for. I'd be willing to help migrate these global functions towards Webpack and setup the config; I'm in no way a master but have been using it frequently on a number of side projects. |
Feel free to raise a new issue/PR. I am somewhat interested to see this
happen, too.
…On 15 Oct 2017 04:33, "Geoff Davis" ***@***.***> wrote:
@xgui3783 <https://github.com/xgui3783> cool. I'm not sure what the
unique challenges are since I haven't looked at this codebase very
in-depth, but wanted to offer this as an option, since that's essentially
what this is asking for.
I'd be willing to help migrate these global functions towards Webpack and
setup the config; I'm in no way a master but have been using it frequently
on a number of side projects.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#75 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ASe-F2UGQq_ZKgmAs0_d5cn29ZAQT8iaks5ssW7egaJpZM4P5br3>
.
|
@geoffdavis92 : Thank you very much for your contribution! 😃 |
i'll work on |
cool! :) |
avoid waiting to be blocked by cors when loading a dataset in localhost
What is the current behavior?
Currently, all of MicroDraw's tools functions are inside one big microdraw.js file. We would like to create one .js file for each tool. (so that in the end we could even work towards a configurable toolbar)
What is the expected or desired behaviour?
We would like to create one .js file for each tool. (so that in the end we could even work towards a configurable toolbar)
Join us! 😃 To help us, you can find details for the two extraction cases below our list of tools.
Please reply here as soon as you start working on one tool to avoid redundant effort :)
These are all the tools we want to separate:
To jump in helping us, have a look at the first tool separation in this pull request #74 by @r03ert0 and follow this example to separate more tools.
For all tools that simply require a click, this is the way to go:
and you are done 😃
\ö/ thank youuuu
For all tools that require mouseDown and mouseUp handler you can follow the example in pull request #76 and see how to encapsulate tools like draw and draw polygon. This should help encapsulating some other tools. It doesn't work for tools that require the mouseDrag handler, such as rotate.
The text was updated successfully, but these errors were encountered: