We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.4.0
Tested on Firefox, Google Chrome
Image with the clicks marked:
Click and release at the same spot should not add anything.
In src/js/component/shape.js replace
src/js/component/shape.js
_onFabricMouseUp() { const canvas = this.getCanvas(); const shape = this._shapeObj; if (shape) { resizeHelper.adjustOriginToCenter(shape); } this.fire(eventNames.ADD_OBJECT_AFTER, this.graphics.createObjectProperties(shape)); canvas.off({ 'mouse:move': this._handlers.mousemove, 'mouse:up': this._handlers.mouseup }); }
with
_onFabricMouseUp() { const canvas = this.getCanvas(); const shape = this._shapeObj; if (shape) { resizeHelper.adjustOriginToCenter(shape); this.fire(eventNames.ADD_OBJECT_AFTER, this.graphics.createObjectProperties(shape)); } canvas.off({ 'mouse:move': this._handlers.mousemove, 'mouse:up': this._handlers.mouseup }); }
This way if the mouse isn't moved nothing happens.
The text was updated successfully, but these errors were encountered:
fix: Add shape mouseClick without mouse moving fixes #144
3c451d8
439816d
fix: Add shape on mouseClick without mouseMove (fix nhn#144) (nhn#146)
39f25e3
* fix: Fire ADD_OBJECT_AFTER event in shape.add() * fix: Add shape mouseClick without mouse moving fixes nhn#144 * refactor: Rename variable * refactor: Move event
junghwan-park
No branches or pull requests
Version
3.4.0
Development Environment
Tested on Firefox, Google Chrome
Current Behavior
Image with the clicks marked:
Expected Behavior
Click and release at the same spot should not add anything.
Possible fix
In
src/js/component/shape.js
replacewith
This way if the mouse isn't moved nothing happens.
The text was updated successfully, but these errors were encountered: