-
Notifications
You must be signed in to change notification settings - Fork 10k
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
[Editor] Always have an ink editor (when in ink mode) #15163
Conversation
|
||
if (!isCommitting) { | ||
// We're removing an editor but an empty one can already exist so in this | ||
// case we don't need to creaate a new one. |
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.
// case we don't need to creaate a new one. | |
// case we don't need to create a new one. |
src/display/editor/ink.js
Outdated
@@ -491,6 +498,7 @@ class InkEditor extends AnnotationEditor { | |||
*/ | |||
#createCanvas() { | |||
this.canvas = document.createElement("canvas"); | |||
this.canvas.width = this.canvas.height = 1; |
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.
Does the canvas need to have a size, or would 0
work as the initial value?
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.
if (this.isEmpty()) { | ||
return null; | ||
} | ||
|
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.
Do you perhaps want to make the same change for the FreeText
-class as well?
Previously it was created only on mouseover event but on a touch screen there are no fingerover event... The idea behind creating the ink editor on mouseover was to avoid to have a canvas on each visible page. So now, when the editor is created, the canvas has dimensions 1x1 and only when the user starts drawing the dimensions are set to the page ones.
fe25477
to
2df2def
Compare
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/0e466c097ddfffa/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/81820aaa180e0a3/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/0e466c097ddfffa/output.txt Total script time: 5.11 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/81820aaa180e0a3/output.txt Total script time: 7.31 mins
|
Previously it was created only on mouseover event but on a touch screen
there are no fingerover event...
The idea behind creating the ink editor on mouseover was to avoid to have
a canvas on each visible page.
So now, when the editor is created, the canvas has dimensions 1x1 and
only when the user starts drawing the dimensions are set to the page ones.