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

Draw tool issue #1 - strokes change its position by itself #228

Closed
onadein opened this issue Jul 22, 2019 · 16 comments
Closed

Draw tool issue #1 - strokes change its position by itself #228

onadein opened this issue Jul 22, 2019 · 16 comments
Assignees
Labels

Comments

@onadein
Copy link

onadein commented Jul 22, 2019

Version

3.5.3 and 3.6.0

Development Environment

Chrome, Windows

Current Behavior

  1. Go to http:https://nhn.github.io/tui.image-editor/latest/tutorial-example01-includeUi/
  2. Select Draw tool.
  3. Draw first stoke.
  4. When starting to draw second stroke - first stroke moved.
  5. When starting to draw third stroke - second stroke moved.
    etc.
    See screen capture attached.
    draw_tool_issue_1
    draw_tool_issue_1.zip

Expected Behavior

Previous strokes shouldn't change its position when drawing some more ones.

@ThierryNapspirit
Copy link

Same issue on Linux: Chrome and Firefox.

@ThierryNapspirit
Copy link

ThierryNapspirit commented Jul 25, 2019

May be a bug / regression from fabric.js
I have found this similar issue: fabricjs/fabric.js#5705

But it should be fixed now on frabric.js ....

@shreyanshsheth26
Copy link

I am facing same issue in angular 8 version,
i have installed fabric "fabric": "^3.3.0-browser",

@pollosssss
Copy link

How can I fix it?

@junghwan-park
Copy link
Member

I checked this issue very briefly, I think fabric.js and ImageEditor's canvas dimension is not synchronized. Fabric.js re-render already rendered free drawing lines when new line has to first render. Already rendered free drawing line's position was slightly mismatched.

I'll dig down this issue and find out what's the exact reason of free drawing line jumping.

@junghwan-park junghwan-park self-assigned this Aug 1, 2019
@junghwan-park junghwan-park added this to the v3.8.0 milestone Aug 1, 2019
@treztreiz
Copy link

Hey, is there a fix for this bug ? Thank you.

@aldrashan
Copy link

Hey, is there a fix for this bug ? Thank you.

Or can anyone tell us what the latest compatible versions that don't have bugs are?

@treztreiz
Copy link

Hey, is there a fix for this bug ? Thank you.

Or can anyone tell us what the latest compatible versions that don't have bugs are?

Using the 1.6.7 version of fabric.js seems to prevent this bug.
https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.6.7/fabric.min.js

@sphildreth
Copy link

Hey, is there a fix for this bug ? Thank you.

Or can anyone tell us what the latest compatible versions that don't have bugs are?

Using the 1.6.7 version of fabric.js seems to prevent this bug.
https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.6.7/fabric.min.js

Be aware with this 1.6.7 fabric version several of the filters (Greytone, Sepia, Vintage, etc.) don't seem to work the same (invalid parameter exceptions get thrown) as current fabric version.

@aldrashan
Copy link

Hey, is there a fix for this bug ? Thank you.

Or can anyone tell us what the latest compatible versions that don't have bugs are?

Using the 1.6.7 version of fabric.js seems to prevent this bug.
https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.6.7/fabric.min.js

Be aware with this 1.6.7 fabric version several of the filters (Greytone, Sepia, Vintage, etc.) don't seem to work the same (invalid parameter exceptions get thrown) as current fabric version.

For some reason the drawing on mobile isn't working properly there either. Touch coordinates seem to "lag behind" i.e. touch coordinate starts at the correct position but starts to be incorrect when moving your finger around. Don't think it's getting scaled to the correct position properly when the canvas is larger than the screen size. Probably fixed in a later version but alas...

@mater1996
Copy link

mater1996 commented Oct 9, 2019

I think it was caused by originX and originY being incorrectly set

in graphics.js

_onPathCreated(obj) {

        var SELECTION_STYLE = Object.assign({},consts.fObjectOptions.SELECTION_STYLE)
        SELECTION_STYLE.originX = 'left'
        SELECTION_STYLE.originY = 'top'
        obj.path.set(SELECTION_STYLE);
        const params = this.createObjectProperties(obj.path);

        this.fire(events.ADD_OBJECT, params);
 }

this is right

@rainbowcatcher
Copy link

Is there a plan to fix this bug?

@aborja79
Copy link

Is there any fix?

@ViniciusGularte
Copy link

Any fix to this?

@jinwoo-kim-nhn
Copy link
Contributor

#280

@jinwoo-kim-nhn
Copy link
Contributor

resolved at 3.7.1

@jinwoo-kim-nhn jinwoo-kim-nhn removed this from the v3.8.0 milestone Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests