Skip to content

Commit

Permalink
Merge pull request #15146 from calixteman/editing_cursor
Browse files Browse the repository at this point in the history
[Editor] Change the cursor to a pen for the Ink editor
  • Loading branch information
calixteman committed Jul 7, 2022
2 parents 403ed07 + edc9ad1 commit 32d8c55
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/display/editor/ink.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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");

Expand Down
3 changes: 3 additions & 0 deletions web/annotation_editor_layer_builder.css
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -119,6 +120,7 @@
height: 100%;
z-index: 1;
transform-origin: 0 0;
cursor: auto;
}

.annotationEditorLayer .background {
Expand All @@ -132,6 +134,7 @@

.annotationEditorLayer .inkEditor.editing {
resize: none;
cursor: var(--editorInk-editing-cursor), pointer;
}

.annotationEditorLayer .inkEditor .inkEditorCanvas {
Expand Down
2 changes: 1 addition & 1 deletion web/images/toolbarButton-editorInk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 32d8c55

Please sign in to comment.