Skip to content
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

added selector tool to move objects #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

added selector tool to move objects #29

wants to merge 1 commit into from

Conversation

Mk-arc
Copy link

@Mk-arc Mk-arc commented Apr 8, 2020

Hi there,

note: This is still work in progress. I just want to inform you as soon as possible that something is happening here.

I started implementing a "selector"-Tool to move objects after they have been placed. So far it works for Text, Lines and Rectangles... Pencil strokes are still up for implementation.

Problems that i noticed so far:

  • Moving emits a lot of updates to the servers, which results in the client getting blocked when a "drag" is done for long time.
  • I dont really like that the client is working directly on the svg datatypes, while the server is working on abstract datatypes. It would be nice when they work on the same elemets. However, so far, the client doesnt know anything about this objects.
  • Moving pencil strokes is not simple...

Also... this is the first time I worked with javascript... Im coming more from the embedded C++ world. So probably a lot of stuff I did is garbage. It would be nice to receive some help on this issue so we can finish this features fast. Its important :)

@Mk-arc
Copy link
Author

Mk-arc commented Apr 8, 2020

Ohhh I just saw that someone else is working on this issue #10

@lovasoa
Copy link
Owner

lovasoa commented Apr 8, 2020

Awesome, let's work on this together !

Just a question before I dive deeper into your code: why did you choose to create a new "modify" event type instead of reusing "update" ?

@lovasoa
Copy link
Owner

lovasoa commented Apr 8, 2020

* Moving emits a lot of updates to the servers, which results in the client getting blocked when a "drag" is done for long time.

I encountered this problem before, and the easiest solution is to throttle the updates. See how this is done in the pencil tool :
https://github.com/lovasoa/whitebophir/blob/master/client-data/tools/pencil/pencil.js#L61-L67

If we need it in the selection tool too, then we may want to move the throttling code to board.js so that it can be reused by all tools.

@Mk-arc
Copy link
Author

Mk-arc commented Apr 8, 2020

Awesome, let's work on this together. Just a question before I dive deeper into your code: why did you choose to create a new "modify" event type instead of reusing "update" ?

Fair question. I think theres no really specific reason. I guess it seemed more suitable for me to just "modify" the values that are actuallly considered by the change instead of overwriting the whole object.

@lovasoa lovasoa force-pushed the master branch 2 times, most recently from d2ff89d to 189ebbe Compare April 27, 2020 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants