2022-06-01 17:38:08 +09:00
|
|
|
/* Copyright 2022 Mozilla Foundation
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
:root {
|
2023-07-24 16:49:49 +09:00
|
|
|
--outline-width: 2px;
|
|
|
|
--outline-color: blue;
|
|
|
|
--focus-outline: solid var(--outline-width) var(--outline-color);
|
|
|
|
--hover-outline: dashed var(--outline-width) var(--outline-color);
|
2022-06-01 22:42:46 +09:00
|
|
|
--freetext-line-height: 1.35;
|
|
|
|
--freetext-padding: 2px;
|
2023-07-24 16:49:49 +09:00
|
|
|
--resizer-size: 8px;
|
|
|
|
--resizer-shift: calc(
|
|
|
|
0px - var(--outline-width) - var(--resizer-size) / 2 - var(--outline-width) /
|
|
|
|
2
|
|
|
|
);
|
|
|
|
--resizer-color: white;
|
2022-10-27 18:49:03 +09:00
|
|
|
--editorFreeText-editing-cursor: text;
|
2022-08-02 17:26:46 +09:00
|
|
|
/*#if COMPONENTS*/
|
|
|
|
--editorInk-editing-cursor: pointer;
|
|
|
|
/*#else*/
|
2022-10-27 18:49:03 +09:00
|
|
|
--editorInk-editing-cursor: url(images/cursor-editorInk.svg) 0 16, pointer;
|
2022-08-02 17:26:46 +09:00
|
|
|
/*#endif*/
|
2022-06-01 17:38:08 +09:00
|
|
|
}
|
|
|
|
|
2022-11-22 03:43:12 +09:00
|
|
|
@media (min-resolution: 1.1dppx) {
|
|
|
|
:root {
|
|
|
|
/*#if !COMPONENTS*/
|
|
|
|
--editorFreeText-editing-cursor: url(images/cursor-editorFreeText.svg) 0 16,
|
|
|
|
text;
|
|
|
|
/*#endif*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-18 18:49:52 +09:00
|
|
|
@media screen and (forced-colors: active) {
|
2022-06-29 22:39:02 +09:00
|
|
|
:root {
|
2023-07-24 16:49:49 +09:00
|
|
|
--outline-width: 3px;
|
|
|
|
--outline-color: ButtonText;
|
|
|
|
--resizer-size: 12px;
|
|
|
|
--resizer-color: ButtonFace;
|
2022-06-29 22:39:02 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-23 22:47:45 +09:00
|
|
|
[data-editor-rotation="90"] {
|
|
|
|
transform: rotate(90deg);
|
|
|
|
}
|
|
|
|
[data-editor-rotation="180"] {
|
|
|
|
transform: rotate(180deg);
|
|
|
|
}
|
|
|
|
[data-editor-rotation="270"] {
|
|
|
|
transform: rotate(270deg);
|
|
|
|
}
|
|
|
|
|
2022-06-01 17:38:08 +09:00
|
|
|
.annotationEditorLayer {
|
|
|
|
background: transparent;
|
|
|
|
position: absolute;
|
2023-07-25 22:05:35 +09:00
|
|
|
inset: 0;
|
2022-06-13 18:01:55 +09:00
|
|
|
font-size: calc(100px * var(--scale-factor));
|
2022-06-23 22:47:45 +09:00
|
|
|
transform-origin: 0 0;
|
2022-09-02 21:42:35 +09:00
|
|
|
cursor: auto;
|
2022-12-23 05:55:25 +09:00
|
|
|
z-index: 4;
|
2022-09-02 21:42:35 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer.freeTextEditing {
|
2022-10-27 18:49:03 +09:00
|
|
|
cursor: var(--editorFreeText-editing-cursor);
|
2022-09-02 21:42:35 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer.inkEditing {
|
2022-10-27 18:49:03 +09:00
|
|
|
cursor: var(--editorInk-editing-cursor);
|
2022-06-01 17:38:08 +09:00
|
|
|
}
|
|
|
|
|
2023-06-22 19:16:07 +09:00
|
|
|
.annotationEditorLayer
|
2023-08-03 03:08:09 +09:00
|
|
|
:is(.freeTextEditor, .inkEditor, .stampEditor).draggable {
|
2023-03-22 17:49:24 +09:00
|
|
|
cursor: move;
|
|
|
|
}
|
|
|
|
|
2022-07-21 17:42:15 +09:00
|
|
|
.annotationEditorLayer .selectedEditor {
|
|
|
|
outline: var(--focus-outline);
|
|
|
|
}
|
|
|
|
|
2023-06-22 19:16:07 +09:00
|
|
|
.annotationEditorLayer :is(.freeTextEditor, .inkEditor, .stampEditor) {
|
2022-06-01 17:38:08 +09:00
|
|
|
position: absolute;
|
|
|
|
background: transparent;
|
|
|
|
border-radius: 3px;
|
2023-06-22 19:16:07 +09:00
|
|
|
z-index: 1;
|
|
|
|
transform-origin: 0 0;
|
|
|
|
cursor: auto;
|
2023-07-14 01:31:08 +09:00
|
|
|
max-width: 100%;
|
|
|
|
max-height: 100%;
|
2023-06-22 19:16:07 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .freeTextEditor {
|
2022-06-13 18:01:55 +09:00
|
|
|
padding: calc(var(--freetext-padding) * var(--scale-factor));
|
2022-06-01 17:38:08 +09:00
|
|
|
width: auto;
|
|
|
|
height: auto;
|
2022-07-20 01:20:56 +09:00
|
|
|
touch-action: none;
|
2022-06-01 17:38:08 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .freeTextEditor .internal {
|
|
|
|
background: transparent;
|
|
|
|
border: none;
|
2023-07-25 22:05:35 +09:00
|
|
|
inset: 0;
|
2022-06-01 17:38:08 +09:00
|
|
|
overflow: visible;
|
|
|
|
white-space: nowrap;
|
2022-06-01 22:42:46 +09:00
|
|
|
font: 10px sans-serif;
|
|
|
|
line-height: var(--freetext-line-height);
|
2023-07-25 02:37:56 +09:00
|
|
|
user-select: none;
|
2022-06-01 17:38:08 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .freeTextEditor .overlay {
|
|
|
|
position: absolute;
|
|
|
|
display: none;
|
|
|
|
background: transparent;
|
2023-07-25 22:05:35 +09:00
|
|
|
inset: 0;
|
2022-06-01 17:38:08 +09:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .freeTextEditor .overlay.enabled {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .freeTextEditor .internal:empty::before {
|
|
|
|
content: attr(default-content);
|
|
|
|
color: gray;
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .freeTextEditor .internal:focus {
|
|
|
|
outline: none;
|
2023-07-25 02:37:56 +09:00
|
|
|
user-select: auto;
|
2022-06-01 17:38:08 +09:00
|
|
|
}
|
|
|
|
|
2023-04-20 03:44:45 +09:00
|
|
|
.annotationEditorLayer
|
2023-06-22 19:16:07 +09:00
|
|
|
:is(.freeTextEditor, .inkEditor, .stampEditor):hover:not(.selectedEditor) {
|
2022-07-21 17:42:15 +09:00
|
|
|
outline: var(--hover-outline);
|
2022-06-05 06:28:19 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .inkEditor {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2022-06-17 01:16:49 +09:00
|
|
|
}
|
|
|
|
|
2022-06-05 06:28:19 +09:00
|
|
|
.annotationEditorLayer .inkEditor.editing {
|
2022-09-02 21:42:35 +09:00
|
|
|
cursor: inherit;
|
2022-06-05 06:28:19 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .inkEditor .inkEditorCanvas {
|
|
|
|
position: absolute;
|
2023-07-25 22:05:35 +09:00
|
|
|
inset: 0;
|
2022-06-05 06:28:19 +09:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2022-07-20 01:20:56 +09:00
|
|
|
touch-action: none;
|
2022-06-05 06:28:19 +09:00
|
|
|
}
|
2023-06-22 19:16:07 +09:00
|
|
|
|
|
|
|
.annotationEditorLayer .stampEditor {
|
|
|
|
width: auto;
|
|
|
|
height: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .stampEditor.loading {
|
|
|
|
aspect-ratio: 1;
|
|
|
|
width: 10%;
|
|
|
|
height: auto;
|
|
|
|
background-color: rgba(128, 128, 128, 0.5);
|
|
|
|
background-image: var(--loading-icon);
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-position: 50%;
|
|
|
|
background-size: 16px 16px;
|
|
|
|
transition-property: background-size;
|
|
|
|
transition-delay: var(--loading-icon-delay);
|
|
|
|
}
|
|
|
|
|
2023-07-24 16:49:49 +09:00
|
|
|
.annotationEditorLayer .stampEditor canvas {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2023-06-22 19:16:07 +09:00
|
|
|
}
|
|
|
|
|
2023-07-24 16:49:49 +09:00
|
|
|
.annotationEditorLayer .resizers {
|
2023-06-22 19:16:07 +09:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2023-07-24 16:49:49 +09:00
|
|
|
position: absolute;
|
|
|
|
inset: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .resizers.hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .resizer {
|
|
|
|
width: var(--resizer-size);
|
|
|
|
height: var(--resizer-size);
|
|
|
|
border-radius: 50%;
|
|
|
|
background: var(--resizer-color);
|
|
|
|
border: var(--focus-outline);
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .resizer.topLeft {
|
2023-08-07 02:14:06 +09:00
|
|
|
cursor: nwse-resize;
|
2023-07-24 16:49:49 +09:00
|
|
|
top: var(--resizer-shift);
|
|
|
|
left: var(--resizer-shift);
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .resizer.topMiddle {
|
2023-08-07 02:14:06 +09:00
|
|
|
cursor: ns-resize;
|
2023-07-24 16:49:49 +09:00
|
|
|
top: var(--resizer-shift);
|
|
|
|
left: calc(50% + var(--resizer-shift));
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .resizer.topRight {
|
2023-08-07 02:14:06 +09:00
|
|
|
cursor: nesw-resize;
|
2023-07-24 16:49:49 +09:00
|
|
|
top: var(--resizer-shift);
|
|
|
|
right: var(--resizer-shift);
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .resizer.middleRight {
|
2023-08-07 02:14:06 +09:00
|
|
|
cursor: ew-resize;
|
2023-07-24 16:49:49 +09:00
|
|
|
top: calc(50% + var(--resizer-shift));
|
|
|
|
right: var(--resizer-shift);
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .resizer.bottomRight {
|
2023-08-07 02:14:06 +09:00
|
|
|
cursor: nwse-resize;
|
2023-07-24 16:49:49 +09:00
|
|
|
bottom: var(--resizer-shift);
|
|
|
|
right: var(--resizer-shift);
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .resizer.bottomMiddle {
|
2023-08-07 02:14:06 +09:00
|
|
|
cursor: ns-resize;
|
2023-07-24 16:49:49 +09:00
|
|
|
bottom: var(--resizer-shift);
|
|
|
|
left: calc(50% + var(--resizer-shift));
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .resizer.bottomLeft {
|
2023-08-07 02:14:06 +09:00
|
|
|
cursor: nesw-resize;
|
2023-07-24 16:49:49 +09:00
|
|
|
bottom: var(--resizer-shift);
|
|
|
|
left: var(--resizer-shift);
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .resizer.middleLeft {
|
2023-08-07 02:14:06 +09:00
|
|
|
cursor: ew-resize;
|
2023-07-24 16:49:49 +09:00
|
|
|
top: calc(50% + var(--resizer-shift));
|
|
|
|
left: var(--resizer-shift);
|
|
|
|
}
|
|
|
|
|
2023-08-07 02:14:06 +09:00
|
|
|
.annotationEditorLayer:is(.resizingTopLeft, .resizingBottomRight) {
|
|
|
|
cursor: nwse-resize;
|
2023-07-24 16:49:49 +09:00
|
|
|
}
|
|
|
|
|
2023-08-07 02:14:06 +09:00
|
|
|
.annotationEditorLayer:is(.resizingTopMiddle, .resizingBottomMiddle) {
|
|
|
|
cursor: ns-resize;
|
2023-07-24 16:49:49 +09:00
|
|
|
}
|
|
|
|
|
2023-08-07 02:14:06 +09:00
|
|
|
.annotationEditorLayer:is(.resizingTopRight, .resizingBottomLeft) {
|
|
|
|
cursor: nesw-resize;
|
2023-07-24 16:49:49 +09:00
|
|
|
}
|
|
|
|
|
2023-08-07 02:14:06 +09:00
|
|
|
.annotationEditorLayer:is(.resizingMiddleRight, .resizingMiddleLeft) {
|
|
|
|
cursor: ew-resize;
|
2023-06-22 19:16:07 +09:00
|
|
|
}
|