-
Notifications
You must be signed in to change notification settings - Fork 505
Issue/10382 #3063
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
Issue/10382 #3063
Changes from all commits
6af4856
7807aaf
215fa83
9b3d821
e7c296f
c3cbec4
9c4b9ae
86c47f2
283eea8
07e5e73
d124a71
78e8b2b
682ec1e
8fa3ea8
a1cfbbc
8ba1ed8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -88,7 +88,7 @@ Entry.BlockView = class BlockView { | |||||||
| } | ||||||||
|
|
||||||||
| this.isInBlockMenu = this.getBoard() instanceof Entry.BlockMenu; | ||||||||
| this.mouseHandler = function (e) { | ||||||||
| this.mouseHandler = function(e) { | ||||||||
| (_.result(that.block.events, 'mousedown') || []).forEach((fn) => { | ||||||||
| if (Entry.documentMousedown) { | ||||||||
| Entry.documentMousedown.notify(e); | ||||||||
|
|
@@ -608,7 +608,7 @@ Entry.BlockView = class BlockView { | |||||||
| const mouseDownCoordinate = this.mouseDownCoordinate; | ||||||||
| const diff = Math.sqrt( | ||||||||
| Math.pow(mouseEvent.pageX - mouseDownCoordinate.x, 2) + | ||||||||
| Math.pow(mouseEvent.pageY - mouseDownCoordinate.y, 2) | ||||||||
| Math.pow(mouseEvent.pageY - mouseDownCoordinate.y, 2) | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Suggested change
|
||||||||
| ); | ||||||||
| if (this.dragMode == Entry.DRAG_MODE_DRAG || diff > Entry.BlockView.DRAG_RADIUS) { | ||||||||
| const blockView = this; | ||||||||
|
|
@@ -1019,9 +1019,8 @@ Entry.BlockView = class BlockView { | |||||||
| magnet = this.magnet.previous; | ||||||||
| const dragHeight = dragBlock.getBelowHeight(); | ||||||||
| const nextX = _get(dragBlock, 'magnet.next.x'); | ||||||||
| transform = `translate(${pos.scaleX + magnet.x - nextX},${ | ||||||||
| pos.scaleY + magnet.y - dragHeight | ||||||||
| })`; | ||||||||
| transform = `translate(${pos.scaleX + magnet.x - nextX},${pos.scaleY + magnet.y - dragHeight | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Suggested change
|
||||||||
| })`; | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Suggested change
|
||||||||
| } | ||||||||
|
|
||||||||
| const $shadow = $(shadow); | ||||||||
|
|
@@ -1642,7 +1641,7 @@ Entry.BlockView = class BlockView { | |||||||
| halfWidth = 20; | ||||||||
| } | ||||||||
| return { | ||||||||
| getBoundingClientRect: function () { | ||||||||
| getBoundingClientRect: function() { | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Suggested change
|
||||||||
| const coord = this.getAbsoluteCoordinate(); | ||||||||
| const boardOffset = this._board.relativeOffset; | ||||||||
| const magnet = this.magnet[selector]; | ||||||||
|
|
@@ -1767,7 +1766,7 @@ Entry.BlockView = class BlockView { | |||||||
| canvas.height = height; | ||||||||
| const ctx = canvas.getContext('2d'); | ||||||||
|
|
||||||||
| img.onload = function () { | ||||||||
| img.onload = function() { | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Suggested change
|
||||||||
| try { | ||||||||
| ctx.drawImage(img, 0, 0, width, height); | ||||||||
| const data = canvas.toDataURL('image/png'); | ||||||||
|
|
@@ -1780,7 +1779,7 @@ Entry.BlockView = class BlockView { | |||||||
| } | ||||||||
| }; | ||||||||
|
|
||||||||
| img.onerror = function () { | ||||||||
| img.onerror = function() { | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Suggested change
|
||||||||
| return reject('error occured'); | ||||||||
| }; | ||||||||
| img.src = src; | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
·