Merge pull request #15146 from calixteman/editing_cursor

[Editor] Change the cursor to a pen for the Ink editor
This commit is contained in:
calixteman 2022-07-07 18:43:41 +02:00 committed by GitHub
commit 32d8c55642
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -233,7 +233,6 @@ class InkEditor extends AnnotationEditor {
}
super.enableEditMode();
this.canvas.style.cursor = "pointer";
this.div.draggable = false;
this.canvas.addEventListener("mousedown", this.#boundCanvasMousedown);
this.canvas.addEventListener("mouseup", this.#boundCanvasMouseup);
@ -246,7 +245,6 @@ class InkEditor extends AnnotationEditor {
}
super.disableEditMode();
this.canvas.style.cursor = "auto";
this.div.draggable = !this.isEmpty();
this.div.classList.remove("editing");

View File

@ -18,6 +18,7 @@
--hover-outline: dashed 2px blue;
--freetext-line-height: 1.35;
--freetext-padding: 2px;
--editorInk-editing-cursor: url(images/toolbarButton-editorInk.svg) 0 16;
}
@media (forced-colors: active) {
@ -119,6 +120,7 @@
height: 100%;
z-index: 1;
transform-origin: 0 0;
cursor: auto;
}
.annotationEditorLayer .background {
@ -132,6 +134,7 @@
.annotationEditorLayer .inkEditor.editing {
resize: none;
cursor: var(--editorInk-editing-cursor), pointer;
}
.annotationEditorLayer .inkEditor .inkEditorCanvas {

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 16 16">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 16 16">
<g>
<g transform="scale(0.03125)">
<path d="m455.1,137.9l-32.4,32.4-81-81.1 32.4-32.4c6.6-6.6 18.1-6.6 24.7,0l56.3,56.4c6.8,6.8 6.8,17.9 0,24.7zm-270.7,271l-81-81.1 209.4-209.7 81,81.1-209.4,209.7zm-99.7-42l60.6,60.7-84.4,23.8 23.8-84.5zm399.3-282.6l-56.3-56.4c-11-11-50.7-31.8-82.4,0l-285.3,285.5c-2.5,2.5-4.3,5.5-5.2,8.9l-43,153.1c-2,7.1 0.1,14.7 5.2,20 5.2,5.3 15.6,6.2 20,5.2l153-43.1c3.4-0.9 6.4-2.7 8.9-5.2l285.1-285.5c22.7-22.7 22.7-59.7 0-82.5z"/>

Before

Width:  |  Height:  |  Size: 781 B

After

Width:  |  Height:  |  Size: 804 B