js-draw 1.21.3 → 1.22.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +103 -75
- package/build-config.json +2 -2
- package/dist/Editor.css +29 -16
- package/dist/bundle.js +2 -2
- package/dist/bundledStyles.js +1 -1
- package/dist/cjs/Editor.js +36 -22
- package/dist/cjs/EventDispatcher.js +1 -1
- package/dist/cjs/Pointer.js +3 -3
- package/dist/cjs/SVGLoader/SVGLoader.js +13 -6
- package/dist/cjs/UndoRedoHistory.js +1 -1
- package/dist/cjs/Viewport.js +4 -2
- package/dist/cjs/commands/Command.js +7 -5
- package/dist/cjs/commands/Duplicate.js +2 -2
- package/dist/cjs/commands/Erase.js +3 -4
- package/dist/cjs/commands/invertCommand.js +4 -4
- package/dist/cjs/commands/lib.d.ts +1 -1
- package/dist/cjs/commands/uniteCommands.js +4 -4
- package/dist/cjs/components/AbstractComponent.d.ts +1 -1
- package/dist/cjs/components/AbstractComponent.js +3 -3
- package/dist/cjs/components/BackgroundComponent.js +8 -6
- package/dist/cjs/components/ImageComponent.js +12 -5
- package/dist/cjs/components/RestylableComponent.js +1 -1
- package/dist/cjs/components/SVGGlobalAttributesObject.js +1 -2
- package/dist/cjs/components/Stroke.js +37 -24
- package/dist/cjs/components/TextComponent.js +13 -10
- package/dist/cjs/components/UnknownSVGObject.js +2 -3
- package/dist/cjs/components/builders/ArrowBuilder.d.ts +6 -0
- package/dist/cjs/components/builders/ArrowBuilder.js +9 -3
- package/dist/cjs/components/builders/CircleBuilder.d.ts +6 -0
- package/dist/cjs/components/builders/CircleBuilder.js +11 -4
- package/dist/cjs/components/builders/FreehandLineBuilder.d.ts +6 -0
- package/dist/cjs/components/builders/FreehandLineBuilder.js +10 -4
- package/dist/cjs/components/builders/LineBuilder.d.ts +6 -0
- package/dist/cjs/components/builders/LineBuilder.js +8 -4
- package/dist/cjs/components/builders/PolylineBuilder.d.ts +4 -1
- package/dist/cjs/components/builders/PolylineBuilder.js +9 -5
- package/dist/cjs/components/builders/PressureSensitiveFreehandLineBuilder.js +16 -10
- package/dist/cjs/components/builders/RectangleBuilder.d.ts +12 -0
- package/dist/cjs/components/builders/RectangleBuilder.js +17 -3
- package/dist/cjs/components/builders/autocorrect/makeShapeFitAutocorrect.js +5 -8
- package/dist/cjs/components/builders/autocorrect/makeSnapToGridAutocorrect.js +1 -1
- package/dist/cjs/components/builders/lib.d.ts +7 -0
- package/dist/cjs/components/builders/lib.js +18 -0
- package/dist/cjs/components/lib.d.ts +1 -4
- package/dist/cjs/components/lib.js +2 -9
- package/dist/cjs/components/util/StrokeSmoother.js +5 -6
- package/dist/cjs/dialogs/makeAboutDialog.js +1 -1
- package/dist/cjs/dialogs/makeMessageDialog.js +2 -2
- package/dist/cjs/image/EditorImage.js +13 -15
- package/dist/cjs/image/export/editorImageToSVG.js +1 -1
- package/dist/cjs/inputEvents.js +3 -3
- package/dist/cjs/lib.d.ts +2 -2
- package/dist/cjs/localizations/de.js +2 -2
- package/dist/cjs/localizations/es.js +7 -3
- package/dist/cjs/rendering/Display.js +7 -3
- package/dist/cjs/rendering/RenderablePathSpec.js +26 -11
- package/dist/cjs/rendering/RenderingStyle.js +22 -15
- package/dist/cjs/rendering/TextRenderingStyle.js +1 -1
- package/dist/cjs/rendering/caching/CacheRecord.js +1 -1
- package/dist/cjs/rendering/caching/CacheRecordManager.js +1 -1
- package/dist/cjs/rendering/caching/RenderingCache.js +1 -1
- package/dist/cjs/rendering/caching/RenderingCacheNode.js +26 -15
- package/dist/cjs/rendering/caching/testUtils.js +2 -2
- package/dist/cjs/rendering/renderers/AbstractRenderer.js +3 -1
- package/dist/cjs/rendering/renderers/CanvasRenderer.js +4 -3
- package/dist/cjs/rendering/renderers/DummyRenderer.js +1 -1
- package/dist/cjs/rendering/renderers/SVGRenderer.js +37 -19
- package/dist/cjs/rendering/renderers/TextOnlyRenderer.js +13 -15
- package/dist/cjs/shortcuts/KeyBinding.js +6 -12
- package/dist/cjs/shortcuts/KeyboardShortcutManager.js +2 -2
- package/dist/cjs/testing/createEditor.js +6 -1
- package/dist/cjs/testing/findNodeWithText.d.ts +4 -1
- package/dist/cjs/testing/findNodeWithText.js +12 -3
- package/dist/cjs/testing/getUniquePointerId.js +1 -1
- package/dist/cjs/testing/sendHtmlSwipe.js +7 -3
- package/dist/cjs/testing/sendPenEvent.js +1 -3
- package/dist/cjs/testing/sendTouchEvent.js +1 -4
- package/dist/cjs/testing/startPinchGesture.js +3 -1
- package/dist/cjs/toolbar/AbstractToolbar.js +7 -11
- package/dist/cjs/toolbar/EdgeToolbar.js +11 -15
- package/dist/cjs/toolbar/IconProvider.js +5 -3
- package/dist/cjs/toolbar/localization.js +3 -3
- package/dist/cjs/toolbar/utils/HelpDisplay.js +8 -6
- package/dist/cjs/toolbar/utils/makeDraggable.js +4 -7
- package/dist/cjs/toolbar/widgets/BaseToolWidget.js +3 -2
- package/dist/cjs/toolbar/widgets/BaseWidget.js +7 -7
- package/dist/cjs/toolbar/widgets/DocumentPropertiesWidget.js +2 -2
- package/dist/cjs/toolbar/widgets/EraserToolWidget.js +5 -3
- package/dist/cjs/toolbar/widgets/HandToolWidget.js +8 -6
- package/dist/cjs/toolbar/widgets/InsertImageWidget/InsertImageWidget.js +9 -10
- package/dist/cjs/toolbar/widgets/PenToolWidget.js +22 -13
- package/dist/cjs/toolbar/widgets/SelectionToolWidget.js +2 -2
- package/dist/cjs/toolbar/widgets/TextToolWidget.js +5 -5
- package/dist/cjs/toolbar/widgets/components/makeFileInput.js +7 -7
- package/dist/cjs/toolbar/widgets/components/makeGridSelector.js +5 -5
- package/dist/cjs/toolbar/widgets/components/makeSnappedList.js +9 -5
- package/dist/cjs/toolbar/widgets/keybindings.js +2 -2
- package/dist/cjs/toolbar/widgets/layout/DropdownLayoutManager.js +6 -6
- package/dist/cjs/tools/BaseTool.js +5 -3
- package/dist/cjs/tools/Eraser.js +25 -20
- package/dist/cjs/tools/FindTool.js +2 -2
- package/dist/cjs/tools/InputFilter/ContextMenuRecognizer.js +1 -3
- package/dist/cjs/tools/InputFilter/InputMapper.js +1 -1
- package/dist/cjs/tools/InputFilter/InputPipeline.js +1 -1
- package/dist/cjs/tools/InputFilter/InputStabilizer.js +12 -5
- package/dist/cjs/tools/InputFilter/StrokeKeyboardControl.js +7 -4
- package/dist/cjs/tools/PanZoom.d.ts +1 -1
- package/dist/cjs/tools/PanZoom.js +17 -12
- package/dist/cjs/tools/PasteHandler.js +8 -2
- package/dist/cjs/tools/Pen.js +17 -9
- package/dist/cjs/tools/ScrollbarTool.js +8 -7
- package/dist/cjs/tools/SelectionTool/Selection.js +16 -12
- package/dist/cjs/tools/SelectionTool/SelectionHandle.js +5 -2
- package/dist/cjs/tools/SelectionTool/SelectionMenuShortcut.js +3 -1
- package/dist/cjs/tools/SelectionTool/SelectionTool.js +25 -16
- package/dist/cjs/tools/SelectionTool/ToPointerAutoscroller.js +1 -1
- package/dist/cjs/tools/SelectionTool/TransformMode.js +6 -7
- package/dist/cjs/tools/SelectionTool/util/makeClipboardErrorHandlers.js +23 -2
- package/dist/cjs/tools/SelectionTool/util/showSelectionContextMenu.js +29 -20
- package/dist/cjs/tools/SoundUITool.js +5 -3
- package/dist/cjs/tools/TextTool.js +8 -6
- package/dist/cjs/tools/ToolController.js +16 -10
- package/dist/cjs/tools/localization.d.ts +2 -0
- package/dist/cjs/tools/localization.js +3 -1
- package/dist/cjs/tools/util/StationaryPenDetector.js +3 -3
- package/dist/cjs/tools/util/createMenuOverlay.js +2 -2
- package/dist/cjs/util/ClipboardHandler.d.ts +1 -1
- package/dist/cjs/util/ClipboardHandler.js +19 -18
- package/dist/cjs/util/ReactiveValue.js +16 -12
- package/dist/cjs/util/adjustEditorThemeForContrast.js +6 -2
- package/dist/cjs/util/guessKeyCodeFromKey.js +1 -1
- package/dist/cjs/util/listenForKeyboardEventsFrom.js +8 -6
- package/dist/cjs/util/waitForAll.js +3 -3
- package/dist/cjs/util/waitForImageLoaded.js +3 -3
- package/dist/cjs/util/waitForTimeout.js +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/mjs/Editor.mjs +37 -23
- package/dist/mjs/EventDispatcher.mjs +1 -1
- package/dist/mjs/Pointer.mjs +3 -3
- package/dist/mjs/SVGLoader/SVGLoader.mjs +14 -7
- package/dist/mjs/UndoRedoHistory.mjs +1 -1
- package/dist/mjs/Viewport.mjs +4 -2
- package/dist/mjs/commands/Command.mjs +7 -5
- package/dist/mjs/commands/Duplicate.mjs +2 -2
- package/dist/mjs/commands/Erase.mjs +3 -4
- package/dist/mjs/commands/invertCommand.mjs +4 -4
- package/dist/mjs/commands/lib.d.ts +1 -1
- package/dist/mjs/commands/lib.mjs +1 -1
- package/dist/mjs/commands/uniteCommands.mjs +4 -4
- package/dist/mjs/components/AbstractComponent.d.ts +1 -1
- package/dist/mjs/components/AbstractComponent.mjs +3 -3
- package/dist/mjs/components/BackgroundComponent.mjs +10 -8
- package/dist/mjs/components/ImageComponent.mjs +12 -5
- package/dist/mjs/components/RestylableComponent.mjs +2 -2
- package/dist/mjs/components/SVGGlobalAttributesObject.mjs +1 -2
- package/dist/mjs/components/Stroke.mjs +40 -27
- package/dist/mjs/components/TextComponent.mjs +15 -12
- package/dist/mjs/components/UnknownSVGObject.mjs +2 -3
- package/dist/mjs/components/builders/ArrowBuilder.d.ts +6 -0
- package/dist/mjs/components/builders/ArrowBuilder.mjs +9 -3
- package/dist/mjs/components/builders/CircleBuilder.d.ts +6 -0
- package/dist/mjs/components/builders/CircleBuilder.mjs +11 -4
- package/dist/mjs/components/builders/FreehandLineBuilder.d.ts +6 -0
- package/dist/mjs/components/builders/FreehandLineBuilder.mjs +10 -4
- package/dist/mjs/components/builders/LineBuilder.d.ts +6 -0
- package/dist/mjs/components/builders/LineBuilder.mjs +8 -4
- package/dist/mjs/components/builders/PolylineBuilder.d.ts +4 -1
- package/dist/mjs/components/builders/PolylineBuilder.mjs +10 -6
- package/dist/mjs/components/builders/PressureSensitiveFreehandLineBuilder.mjs +17 -11
- package/dist/mjs/components/builders/RectangleBuilder.d.ts +12 -0
- package/dist/mjs/components/builders/RectangleBuilder.mjs +17 -3
- package/dist/mjs/components/builders/autocorrect/makeShapeFitAutocorrect.mjs +5 -8
- package/dist/mjs/components/builders/autocorrect/makeSnapToGridAutocorrect.mjs +1 -1
- package/dist/mjs/components/builders/lib.d.ts +7 -0
- package/dist/mjs/components/builders/lib.mjs +7 -0
- package/dist/mjs/components/lib.d.ts +1 -4
- package/dist/mjs/components/lib.mjs +2 -5
- package/dist/mjs/components/util/StrokeSmoother.mjs +5 -6
- package/dist/mjs/dialogs/makeAboutDialog.mjs +1 -1
- package/dist/mjs/dialogs/makeMessageDialog.mjs +2 -2
- package/dist/mjs/image/EditorImage.mjs +13 -15
- package/dist/mjs/image/export/editorImageToSVG.mjs +1 -1
- package/dist/mjs/inputEvents.mjs +3 -3
- package/dist/mjs/lib.d.ts +2 -2
- package/dist/mjs/lib.mjs +2 -2
- package/dist/mjs/localization.mjs +2 -2
- package/dist/mjs/localizations/de.mjs +2 -2
- package/dist/mjs/localizations/es.mjs +7 -3
- package/dist/mjs/rendering/Display.mjs +7 -3
- package/dist/mjs/rendering/RenderablePathSpec.mjs +26 -11
- package/dist/mjs/rendering/RenderingStyle.mjs +22 -15
- package/dist/mjs/rendering/TextRenderingStyle.mjs +1 -1
- package/dist/mjs/rendering/caching/CacheRecord.mjs +1 -1
- package/dist/mjs/rendering/caching/CacheRecordManager.mjs +1 -1
- package/dist/mjs/rendering/caching/RenderingCache.mjs +1 -1
- package/dist/mjs/rendering/caching/RenderingCacheNode.mjs +26 -15
- package/dist/mjs/rendering/caching/testUtils.mjs +2 -2
- package/dist/mjs/rendering/renderers/AbstractRenderer.mjs +3 -1
- package/dist/mjs/rendering/renderers/CanvasRenderer.mjs +4 -3
- package/dist/mjs/rendering/renderers/DummyRenderer.mjs +1 -1
- package/dist/mjs/rendering/renderers/SVGRenderer.mjs +38 -20
- package/dist/mjs/rendering/renderers/TextOnlyRenderer.mjs +13 -15
- package/dist/mjs/shortcuts/KeyBinding.mjs +6 -12
- package/dist/mjs/shortcuts/KeyboardShortcutManager.mjs +2 -2
- package/dist/mjs/testing/createEditor.mjs +6 -1
- package/dist/mjs/testing/findNodeWithText.d.ts +4 -1
- package/dist/mjs/testing/findNodeWithText.mjs +12 -3
- package/dist/mjs/testing/getUniquePointerId.mjs +1 -1
- package/dist/mjs/testing/sendHtmlSwipe.mjs +7 -3
- package/dist/mjs/testing/sendPenEvent.mjs +1 -3
- package/dist/mjs/testing/sendTouchEvent.mjs +1 -4
- package/dist/mjs/testing/startPinchGesture.mjs +3 -1
- package/dist/mjs/toolbar/AbstractToolbar.mjs +7 -11
- package/dist/mjs/toolbar/EdgeToolbar.mjs +11 -15
- package/dist/mjs/toolbar/IconProvider.mjs +5 -3
- package/dist/mjs/toolbar/localization.mjs +3 -3
- package/dist/mjs/toolbar/utils/HelpDisplay.mjs +8 -6
- package/dist/mjs/toolbar/utils/makeDraggable.mjs +4 -7
- package/dist/mjs/toolbar/widgets/BaseToolWidget.mjs +3 -2
- package/dist/mjs/toolbar/widgets/BaseWidget.mjs +8 -8
- package/dist/mjs/toolbar/widgets/DocumentPropertiesWidget.mjs +2 -2
- package/dist/mjs/toolbar/widgets/EraserToolWidget.mjs +5 -3
- package/dist/mjs/toolbar/widgets/HandToolWidget.mjs +8 -6
- package/dist/mjs/toolbar/widgets/InsertImageWidget/InsertImageWidget.mjs +9 -10
- package/dist/mjs/toolbar/widgets/PenToolWidget.mjs +23 -14
- package/dist/mjs/toolbar/widgets/SelectionToolWidget.mjs +2 -2
- package/dist/mjs/toolbar/widgets/TextToolWidget.mjs +5 -5
- package/dist/mjs/toolbar/widgets/components/makeFileInput.mjs +7 -7
- package/dist/mjs/toolbar/widgets/components/makeGridSelector.mjs +5 -5
- package/dist/mjs/toolbar/widgets/components/makeSnappedList.mjs +9 -5
- package/dist/mjs/toolbar/widgets/keybindings.mjs +2 -2
- package/dist/mjs/toolbar/widgets/layout/DropdownLayoutManager.mjs +6 -6
- package/dist/mjs/tools/BaseTool.mjs +6 -4
- package/dist/mjs/tools/Eraser.mjs +25 -20
- package/dist/mjs/tools/FindTool.mjs +2 -2
- package/dist/mjs/tools/InputFilter/ContextMenuRecognizer.mjs +2 -4
- package/dist/mjs/tools/InputFilter/InputMapper.mjs +1 -1
- package/dist/mjs/tools/InputFilter/InputPipeline.mjs +1 -1
- package/dist/mjs/tools/InputFilter/InputStabilizer.mjs +13 -6
- package/dist/mjs/tools/InputFilter/StrokeKeyboardControl.mjs +7 -4
- package/dist/mjs/tools/PanZoom.d.ts +1 -1
- package/dist/mjs/tools/PanZoom.mjs +18 -13
- package/dist/mjs/tools/PasteHandler.mjs +8 -2
- package/dist/mjs/tools/Pen.mjs +18 -10
- package/dist/mjs/tools/ScrollbarTool.mjs +8 -7
- package/dist/mjs/tools/SelectionTool/Selection.mjs +16 -12
- package/dist/mjs/tools/SelectionTool/SelectionHandle.mjs +5 -2
- package/dist/mjs/tools/SelectionTool/SelectionMenuShortcut.mjs +3 -1
- package/dist/mjs/tools/SelectionTool/SelectionTool.mjs +26 -17
- package/dist/mjs/tools/SelectionTool/ToPointerAutoscroller.mjs +1 -1
- package/dist/mjs/tools/SelectionTool/TransformMode.mjs +6 -7
- package/dist/mjs/tools/SelectionTool/util/makeClipboardErrorHandlers.mjs +23 -2
- package/dist/mjs/tools/SelectionTool/util/showSelectionContextMenu.mjs +29 -20
- package/dist/mjs/tools/SoundUITool.mjs +5 -3
- package/dist/mjs/tools/TextTool.mjs +8 -6
- package/dist/mjs/tools/ToolController.mjs +16 -10
- package/dist/mjs/tools/localization.d.ts +2 -0
- package/dist/mjs/tools/localization.mjs +3 -1
- package/dist/mjs/tools/util/StationaryPenDetector.mjs +3 -3
- package/dist/mjs/tools/util/createMenuOverlay.mjs +2 -2
- package/dist/mjs/util/ClipboardHandler.d.ts +1 -1
- package/dist/mjs/util/ClipboardHandler.mjs +19 -18
- package/dist/mjs/util/ReactiveValue.mjs +16 -12
- package/dist/mjs/util/adjustEditorThemeForContrast.mjs +6 -2
- package/dist/mjs/util/guessKeyCodeFromKey.mjs +1 -1
- package/dist/mjs/util/listenForKeyboardEventsFrom.mjs +8 -6
- package/dist/mjs/util/waitForAll.mjs +3 -3
- package/dist/mjs/util/waitForImageLoaded.mjs +3 -3
- package/dist/mjs/util/waitForTimeout.mjs +1 -1
- package/dist/mjs/version.mjs +1 -1
- package/package.json +88 -88
- package/src/Coloris.css +6 -6
- package/src/Editor.scss +7 -5
- package/src/dialogs/dialogs.scss +3 -4
- package/src/dialogs/makeAboutDialog.scss +2 -2
- package/src/dialogs/makeMessageDialog.scss +11 -7
- package/src/styles.js +1 -1
- package/src/toolbar/AbstractToolbar.scss +20 -12
- package/src/toolbar/DropdownToolbar.scss +5 -4
- package/src/toolbar/EdgeToolbar.scss +65 -31
- package/src/toolbar/toolbar.scss +5 -5
- package/src/toolbar/utils/HelpDisplay.scss +48 -25
- package/src/toolbar/utils/labelVisibleOnHover.scss +39 -16
- package/src/toolbar/widgets/DocumentPropertiesWidget.scss +0 -1
- package/src/toolbar/widgets/HandToolWidget.scss +0 -1
- package/src/toolbar/widgets/InsertImageWidget/InsertImageWidget.scss +2 -3
- package/src/toolbar/widgets/OverflowWidget.css +1 -2
- package/src/toolbar/widgets/PenToolWidget.scss +0 -2
- package/src/toolbar/widgets/SelectionToolWidget.scss +1 -2
- package/src/toolbar/widgets/components/components.scss +6 -6
- package/src/toolbar/widgets/components/makeColorInput.scss +0 -2
- package/src/toolbar/widgets/components/makeFileInput.scss +5 -7
- package/src/toolbar/widgets/components/makeGridSelector.scss +6 -9
- package/src/toolbar/widgets/components/makeSnappedList.scss +3 -4
- package/src/toolbar/widgets/components/makeThicknessSlider.scss +1 -2
- package/src/toolbar/widgets/widgets.scss +7 -7
- package/src/tools/FindTool.css +1 -2
- package/src/tools/ScrollbarTool.scss +9 -5
- package/src/tools/SelectionTool/SelectionTool.scss +15 -7
- package/src/tools/SelectionTool/util/makeClipboardErrorHandlers.scss +1 -2
- package/src/tools/SoundUITool.scss +4 -4
- package/src/tools/tools.scss +5 -6
- package/src/tools/util/createMenuOverlay.scss +10 -4
- package/tsconfig.json +1 -3
- package/typedoc.json +1 -1
package/README.md
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
1
|
<div align="center">
|
4
2
|
<img height="190" src="docs/img/readme-images/logo.svg" alt="js-draw logo"/>
|
5
3
|
</div>
|
@@ -60,10 +58,10 @@ It's possible for applications using `js-draw` to [add custom pen types](https:/
|
|
60
58
|
<video src="https://github.com/personalizedrefrigerator/js-draw/assets/46334387/c8c2b8d5-5537-4df8-a8b5-899c2d7ea5ce"></video>
|
61
59
|
|
62
60
|
</details>
|
61
|
+
|
63
62
|
- [Collaborative editing](https://github.com/personalizedrefrigerator/js-draw/tree/main/docs/examples/example-collaborative)
|
64
63
|
- Saving to and loading from a subset of SVG
|
65
64
|
|
66
|
-
|
67
65
|
# API
|
68
66
|
|
69
67
|
## Creating an `Editor`
|
@@ -71,6 +69,7 @@ It's possible for applications using `js-draw` to [add custom pen types](https:/
|
|
71
69
|
### With a bundler that supports importing `.css` files
|
72
70
|
|
73
71
|
To create a new `Editor` and add it as a child of `document.body`, use the [Editor](https://personalizedrefrigerator.github.io/js-draw/typedoc/classes/js_draw.Editor.html#constructor) constructor:
|
72
|
+
|
74
73
|
```ts
|
75
74
|
import Editor from 'js-draw';
|
76
75
|
import 'js-draw/styles';
|
@@ -83,66 +82,76 @@ The `import js-draw/styles` step requires a bundler that can import `.css` files
|
|
83
82
|
### With a bundler that doesn't support importing `.css` files
|
84
83
|
|
85
84
|
Import the pre-bundled version of the editor to apply CSS after loading the page.
|
85
|
+
|
86
86
|
```ts
|
87
87
|
import Editor from 'js-draw';
|
88
88
|
import 'js-draw/bundledStyles';
|
89
89
|
|
90
90
|
const editor = new Editor(document.body);
|
91
91
|
```
|
92
|
+
|
92
93
|
`js-draw/bundledStyles` is a version of the editor's stylesheets pre-processed by `Webpack`. As such, `import`ing or including it with a `<script src="..."></script>` tag applies editor-specific CSS to the document.
|
93
94
|
|
94
95
|
### Without a bundler
|
95
96
|
|
96
97
|
If you're not using a bundler, consider using the pre-bundled editor:
|
98
|
+
|
97
99
|
```html
|
98
100
|
<!-- Replace 1.0.0 with the latest version of js-draw -->
|
99
101
|
<script src="https://cdn.jsdelivr.net/npm/js-draw@1.0.0/dist/bundle.js"></script>
|
100
102
|
<script>
|
101
|
-
|
102
|
-
|
103
|
-
|
103
|
+
const editor = new jsdraw.Editor(document.body);
|
104
|
+
editor.addToolbar();
|
105
|
+
editor.getRootElement().style.height = '600px';
|
104
106
|
</script>
|
105
107
|
```
|
106
108
|
|
107
109
|
**Note**: To ensure the CDN-hosted version of `js-draw` hasn't been tampered with, consider [including an `integrity="..."` attribute](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity). [Read more about using SRI with JSDelivr](https://www.jsdelivr.com/using-sri-with-dynamic-files).
|
108
110
|
|
109
|
-
|
110
111
|
## Adding a toolbar
|
111
112
|
|
112
113
|
To create a toolbar with buttons for the default tools:
|
114
|
+
|
113
115
|
```ts
|
114
116
|
const toolbar = editor.addToolbar();
|
115
117
|
```
|
116
118
|
|
117
|
-
Save and exit buttons can be added with the [`.addSaveButton`](https://personalizedrefrigerator.github.io/js-draw/typedoc/classes/js_draw.AbstractToolbar.html#addSaveButton) and [`.addExitButton`](https://personalizedrefrigerator.github.io/js-draw/typedoc/classes/js_draw.AbstractToolbar.html#addExitButton) methods:
|
119
|
+
Save and exit buttons can be added with the [`.addSaveButton`](https://personalizedrefrigerator.github.io/js-draw/typedoc/classes/js_draw.AbstractToolbar.html#addSaveButton) and [`.addExitButton`](https://personalizedrefrigerator.github.io/js-draw/typedoc/classes/js_draw.AbstractToolbar.html#addExitButton) methods:
|
120
|
+
|
118
121
|
```ts
|
119
122
|
toolbar.addSaveButton(() => {
|
120
|
-
|
121
|
-
|
123
|
+
const svgElem = editor.toSVG();
|
124
|
+
console.log('The saved SVG:', svgElem.outerHTML);
|
122
125
|
});
|
123
126
|
|
124
127
|
toolbar.addExitButton(() => {
|
125
|
-
|
128
|
+
// Save here?
|
126
129
|
|
127
|
-
|
128
|
-
|
130
|
+
// Removes the editor from the document.
|
131
|
+
editor.remove();
|
129
132
|
});
|
130
133
|
```
|
131
134
|
|
132
135
|
Custom actions can also be added to the toolbar. For example,
|
136
|
+
|
133
137
|
```ts
|
134
138
|
toolbar.addActionButton('Custom', () => {
|
135
|
-
|
139
|
+
// When the action button is pressed
|
136
140
|
});
|
137
141
|
```
|
142
|
+
|
138
143
|
or alternatively, with an icon,
|
144
|
+
|
139
145
|
```ts
|
140
|
-
toolbar.addActionButton(
|
141
|
-
|
142
|
-
|
143
|
-
|
146
|
+
toolbar.addActionButton(
|
147
|
+
{
|
148
|
+
label: 'Custom',
|
149
|
+
icon: editor.icons.makeSaveIcon(),
|
150
|
+
},
|
151
|
+
() => {
|
144
152
|
// Do something here
|
145
|
-
}
|
153
|
+
},
|
154
|
+
);
|
146
155
|
```
|
147
156
|
|
148
157
|
## Loading from SVG
|
@@ -161,6 +170,7 @@ editor.loadFromSVG(`
|
|
161
170
|
**Note**: While `js-draw` supports only a small subset of the SVG markup language, it tries to preserve unrecognised SVG elements.
|
162
171
|
|
163
172
|
For example, although `js-draw` doesn't support `<circle/>` elements,
|
173
|
+
|
164
174
|
```xml
|
165
175
|
<svg
|
166
176
|
viewBox="156 74 200 150"
|
@@ -170,11 +180,13 @@ For example, although `js-draw` doesn't support `<circle/>` elements,
|
|
170
180
|
<circle cx=200 cy=100 r=40 fill='red'/>
|
171
181
|
</svg>
|
172
182
|
```
|
183
|
+
|
173
184
|
renders as
|
174
185
|
|
175
186
|
<img alt="screenshot of the image editor, displaying a green checkmark. The circle is invisible" src="docs/img/readme-images/unsupported-elements--in-editor.png" width="600"/>
|
176
187
|
|
177
188
|
but exports to
|
189
|
+
|
178
190
|
```xml
|
179
191
|
<svg viewBox="156 74 200 150" width="200" height="150" version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg"><g><path d="M156,150M156,150Q190,190 209,217L213,215Q193,187 160,148M209,217M209,217Q212,218 236,178L232,176Q210,215 213,215M236,178M236,178Q240,171 307,95L305,93Q237,168 232,176M307,95M307,95Q312,90 329,78L327,74Q309,87 305,93" fill="#07a837"></path></g><circle cx="200" cy="100" r="40" fill="red"></circle></svg>
|
180
192
|
```
|
@@ -184,30 +196,38 @@ which **does** contain the `<circle/>` element.
|
|
184
196
|
## Customizing the background
|
185
197
|
|
186
198
|
The background color and style can be customized with [editor.setBackgroundStyle](https://personalizedrefrigerator.github.io/js-draw/typedoc/classes/js_draw.Editor.html#setBackgroundStyle). For example,
|
199
|
+
|
187
200
|
```ts
|
188
201
|
import { Editor, Color4, BackgroundComponentBackgroundType } from 'js-draw';
|
189
202
|
const editor = new Editor(document.body);
|
190
203
|
|
191
|
-
editor.dispatch(
|
204
|
+
editor.dispatch(
|
205
|
+
editor.setBackgroundStyle({
|
192
206
|
color: Color4.orange,
|
193
207
|
type: BackgroundComponentBackgroundType.Grid,
|
194
|
-
})
|
208
|
+
}),
|
209
|
+
);
|
195
210
|
```
|
196
211
|
|
197
212
|
Above, we use `editor.dispatch` because `setBackgroundStyle` returns a [`Command`](https://personalizedrefrigerator.github.io/js-draw/typedoc/classes/js_draw.Command.html), rather than changing the background style directly. `js-draw` uses `Command`s to track actions that can be undone and redone.
|
198
213
|
|
199
214
|
By default, `.dispatch` adds `Command`s to the undo stack. To avoid this, pass `false` for the second parameter to [`.dispatch`](https://personalizedrefrigerator.github.io/js-draw/typedoc/classes/js_draw.Editor.html#dispatch):
|
215
|
+
|
200
216
|
```ts
|
201
217
|
const addToHistory = false;
|
202
|
-
editor.dispatch(
|
218
|
+
editor.dispatch(
|
219
|
+
editor.setBackgroundStyle({
|
203
220
|
color: Color4.orange,
|
204
221
|
type: BackgroundComponentBackgroundType.Grid,
|
205
|
-
}),
|
222
|
+
}),
|
223
|
+
addToHistory,
|
224
|
+
);
|
206
225
|
```
|
207
226
|
|
208
227
|
### Making the background fill the screen
|
209
228
|
|
210
229
|
By default, the background has a fixed size and marks the region that will be saved by [`.toSVG`](https://personalizedrefrigerator.github.io/js-draw/typedoc/classes/js_draw.Editor.html#toSVG) or [`.toDataURL`](https://personalizedrefrigerator.github.io/js-draw/typedoc/classes/js_draw.Editor.html#toDataURL). It's possible to make the background auto-resize to the content of the image with [`editor.image.setAutoresizeEnabled(true)`](https://personalizedrefrigerator.github.io/js-draw/typedoc/classes/js_draw.EditorImage.html#setAutoresizeEnabled):
|
230
|
+
|
211
231
|
```ts
|
212
232
|
const editor = new Editor(document.body);
|
213
233
|
|
@@ -224,22 +244,25 @@ To save as an SVG, use [`editor.toSVG()`](https://personalizedrefrigerator.githu
|
|
224
244
|
|
225
245
|
It's also possible to render the editor to a PNG or JPEG data URL. This can be done with [`editor.toDataURL()`](https://personalizedrefrigerator.github.io/js-draw/typedoc/classes/js_draw.Editor.html#toDataURL).
|
226
246
|
|
227
|
-
The region of the image that will be saved can be changed by calling [`editor.image.setImportExportRect`](https://personalizedrefrigerator.github.io/js-draw/typedoc/classes/js_draw.Editor.html#setImportExportRect) or
|
247
|
+
The region of the image that will be saved can be changed by calling [`editor.image.setImportExportRect`](https://personalizedrefrigerator.github.io/js-draw/typedoc/classes/js_draw.Editor.html#setImportExportRect) or
|
228
248
|
|
229
249
|
## Settings/configuration
|
250
|
+
|
230
251
|
### Disabling touchpad panning
|
231
252
|
|
232
253
|
Touchpad/mousewheel pan gestures can conflict with gestures used to scroll the document. To turn off touchpad pan gestures (and scrolling the editor with the mousewheel),
|
254
|
+
|
233
255
|
```ts
|
234
256
|
const editor = new Editor(document.body, {
|
235
|
-
|
257
|
+
wheelEventsEnabled: false,
|
236
258
|
});
|
237
259
|
```
|
238
260
|
|
239
261
|
Alternatively, to only enable touchpad panning when the editor has focus,
|
262
|
+
|
240
263
|
```ts
|
241
264
|
const editor = new Editor(document.body, {
|
242
|
-
|
265
|
+
wheelEventsEnabled: 'only-if-focused',
|
243
266
|
});
|
244
267
|
```
|
245
268
|
|
@@ -248,10 +271,11 @@ const editor = new Editor(document.body, {
|
|
248
271
|
If a user's language is available in [src/localizations/](packages/js-draw/src/localizations) (as determined by `navigator.languages`), that localization will be used.
|
249
272
|
|
250
273
|
To override the default language, use `getLocalizationTable([ 'custom locale here' ])`. For example,
|
274
|
+
|
251
275
|
```ts
|
252
276
|
const editor = new Editor(document.body, {
|
253
|
-
|
254
|
-
|
277
|
+
// Force the Spanish (Español) localizaiton
|
278
|
+
localization: getLocalizationTable(['es']),
|
255
279
|
});
|
256
280
|
```
|
257
281
|
|
@@ -260,6 +284,7 @@ const editor = new Editor(document.body, {
|
|
260
284
|
See [src/localization.ts](packages/js-draw/src/localization.ts) for a list of strings that can be translated.
|
261
285
|
|
262
286
|
Many of the default strings in the editor might be overridden like this:
|
287
|
+
|
263
288
|
```ts
|
264
289
|
const editor = new Editor(document.body, {
|
265
290
|
// Example partial Spanish localization
|
@@ -293,89 +318,93 @@ const editor = new Editor(document.body, {
|
|
293
318
|
### Setting the minimum and maximum zoom
|
294
319
|
|
295
320
|
By default, the editor's minimum and maximum zoom are very large (2·10<sup>-10</sup>x and 10<sup>12</sup>x, respectively). These are configurable by the `minZoom` and `maxZoom` settings. For example,
|
321
|
+
|
296
322
|
```ts
|
297
323
|
const editor = new Editor(document.body, {
|
298
|
-
|
299
|
-
|
324
|
+
minZoom: 0.5,
|
325
|
+
maxZoom: 2,
|
300
326
|
});
|
301
327
|
```
|
302
328
|
|
303
329
|
## Changing the editor's color theme
|
304
330
|
|
305
331
|
The editor's color theme is specified using CSS. Its default theme looks like this:
|
332
|
+
|
306
333
|
```css
|
307
334
|
.imageEditorContainer {
|
308
|
-
|
335
|
+
/* Deafult colors for the editor -- light mode */
|
309
336
|
|
310
|
-
|
311
|
-
|
312
|
-
|
337
|
+
/* Used for unselected buttons and dialog text. */
|
338
|
+
--background-color-1: white;
|
339
|
+
--foreground-color-1: black;
|
313
340
|
|
314
|
-
|
315
|
-
|
316
|
-
|
341
|
+
/* Used for some menu/toolbar backgrounds. */
|
342
|
+
--background-color-2: #f5f5f5;
|
343
|
+
--foreground-color-2: #2c303a;
|
317
344
|
|
318
|
-
|
319
|
-
|
320
|
-
|
345
|
+
/* Used for other menu/toolbar backgrounds. */
|
346
|
+
--background-color-3: #e5e5e5;
|
347
|
+
--foreground-color-3: #1c202a;
|
321
348
|
|
322
|
-
|
323
|
-
|
324
|
-
|
349
|
+
/* Used for selected buttons. */
|
350
|
+
--selection-background-color: #cbdaf1;
|
351
|
+
--selection-foreground-color: #2c303a;
|
325
352
|
|
326
|
-
|
327
|
-
|
353
|
+
/* Used for dialog backgrounds */
|
354
|
+
--background-color-transparent: rgba(105, 100, 100, 0.5);
|
328
355
|
|
329
|
-
|
330
|
-
|
356
|
+
/* Used for shadows */
|
357
|
+
--shadow-color: rgba(0, 0, 0, 0.5);
|
331
358
|
|
332
|
-
|
333
|
-
|
359
|
+
/* Color used for some button/input foregrounds */
|
360
|
+
--primary-action-foreground-color: #15b;
|
334
361
|
}
|
335
362
|
|
336
363
|
@media (prefers-color-scheme: dark) {
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
364
|
+
.imageEditorContainer {
|
365
|
+
/* Default colors for the editor -- dark mode */
|
366
|
+
--background-color-1: #151515;
|
367
|
+
--foreground-color-1: white;
|
341
368
|
|
342
|
-
|
343
|
-
|
369
|
+
--background-color-2: #222;
|
370
|
+
--foreground-color-2: #efefef;
|
344
371
|
|
345
|
-
|
346
|
-
|
372
|
+
--background-color-3: #272627;
|
373
|
+
--foreground-color-3: #eee;
|
347
374
|
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
375
|
+
--selection-background-color: #607;
|
376
|
+
--selection-foreground-color: white;
|
377
|
+
--shadow-color: rgba(250, 250, 250, 0.5);
|
378
|
+
--background-color-transparent: rgba(50, 50, 50, 0.5);
|
352
379
|
|
353
|
-
|
354
|
-
|
380
|
+
--primary-action-foreground-color: #7ae;
|
381
|
+
}
|
355
382
|
}
|
356
383
|
```
|
357
384
|
|
358
385
|
To override it, use a more specific CSS selector to set the theme variables. For example,
|
386
|
+
|
359
387
|
```css
|
360
388
|
/* Notice the "body" below -- the selector needs to be more specific than what's in js-draw */
|
361
389
|
body .imageEditorContainer {
|
362
|
-
|
363
|
-
|
390
|
+
--background-color-1: green;
|
391
|
+
--foreground-color-1: black;
|
364
392
|
|
365
|
-
|
393
|
+
/* For this theme, use the same secondary and tertiary colors
|
366
394
|
(it's okay for them to be the same). */
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
395
|
+
--background-color-2: lime;
|
396
|
+
--foreground-color-2: black;
|
397
|
+
--background-color-3: lime;
|
398
|
+
--foreground-color-3: black;
|
371
399
|
|
372
|
-
|
373
|
-
|
400
|
+
--background-color-transparent: rgba(255, 240, 200, 0.5);
|
401
|
+
--shadow-color: rgba(0, 0, 0, 0.5);
|
374
402
|
|
375
|
-
|
376
|
-
|
403
|
+
--selection-background-color: yellow;
|
404
|
+
--selection-foreground-color: black;
|
377
405
|
}
|
378
406
|
```
|
407
|
+
|
379
408
|
disables the dark theme and creates a theme that primarily uses yellow/green colors.
|
380
409
|
|
381
410
|
See also [adjustEditorThemeForContrast](https://personalizedrefrigerator.github.io/js-draw/typedoc/functions/js_draw.adjustEditorThemeForContrast.html).
|
@@ -386,4 +415,3 @@ See also [adjustEditorThemeForContrast](https://personalizedrefrigerator.github.
|
|
386
415
|
- [How to add a custom pen type](https://personalizedrefrigerator.github.io/js-draw/typedoc/modules/Additional_Documentation.CustomizingTools__.html#md:adding-a-new-pen-type)
|
387
416
|
- [A material icon theme for js-draw](https://personalizedrefrigerator.github.io/js-draw/typedoc/modules/_js_draw_material_icons.html#md:js-drawmaterial-icons)
|
388
417
|
- [More documentation](https://personalizedrefrigerator.github.io/js-draw/typedoc/modules/Additional_Documentation.html)
|
389
|
-
|
package/build-config.json
CHANGED
package/dist/Editor.css
CHANGED
@@ -228,9 +228,7 @@
|
|
228
228
|
padding: 0 !important;
|
229
229
|
padding-bottom: 5px;
|
230
230
|
--active-border-color: rgba(100, 100, 100, 0.5);
|
231
|
-
--active-border-color: color-mix(
|
232
|
-
in srgb, var(--foreground-color-1), transparent
|
233
|
-
);
|
231
|
+
--active-border-color: color-mix(in srgb, var(--foreground-color-1), transparent);
|
234
232
|
}
|
235
233
|
.toolbar-element .toolbar--file-input-container > label .cancel-button {
|
236
234
|
padding-left: 3px;
|
@@ -417,7 +415,8 @@
|
|
417
415
|
cursor: unset;
|
418
416
|
}
|
419
417
|
|
420
|
-
.toolbar-button,
|
418
|
+
.toolbar-button,
|
419
|
+
.toolbar-element button {
|
421
420
|
cursor: pointer;
|
422
421
|
text-align: center;
|
423
422
|
border-radius: 6px;
|
@@ -460,7 +459,8 @@
|
|
460
459
|
width: 6em;
|
461
460
|
}
|
462
461
|
|
463
|
-
.toolbar-button:not(.disabled):hover,
|
462
|
+
.toolbar-button:not(.disabled):hover,
|
463
|
+
.toolbar-root button:not(:disabled):hover {
|
464
464
|
box-shadow: 0px 2px 4px var(--shadow-color);
|
465
465
|
}
|
466
466
|
|
@@ -558,7 +558,8 @@
|
|
558
558
|
transition: none;
|
559
559
|
}
|
560
560
|
/* ...and background color animation. */
|
561
|
-
:root .toolbar-button,
|
561
|
+
:root .toolbar-button,
|
562
|
+
.toolbar-root button {
|
562
563
|
transition: none;
|
563
564
|
}
|
564
565
|
}
|
@@ -1020,7 +1021,8 @@
|
|
1020
1021
|
border-top-right-radius: 30px;
|
1021
1022
|
transition: transform 0.1s ease, padding-bottom 0.1s ease;
|
1022
1023
|
}
|
1023
|
-
.toolbar-edgemenu-container .toolbar-edgemenu input,
|
1024
|
+
.toolbar-edgemenu-container .toolbar-edgemenu input,
|
1025
|
+
.toolbar-edgemenu-container .toolbar-edgemenu textarea {
|
1024
1026
|
user-select: auto;
|
1025
1027
|
-webkit-user-select: auto;
|
1026
1028
|
}
|
@@ -1110,12 +1112,14 @@
|
|
1110
1112
|
flex-shrink: 1;
|
1111
1113
|
}
|
1112
1114
|
|
1113
|
-
.toolbar-dropdown-toolbar button,
|
1115
|
+
.toolbar-dropdown-toolbar button,
|
1116
|
+
.toolbar-dropdown-toolbar .toolbar-button {
|
1114
1117
|
background-color: var(--background-color-2);
|
1115
1118
|
color: var(--foreground-color-2);
|
1116
1119
|
--icon-color: var(--foreground-color-2);
|
1117
1120
|
}
|
1118
|
-
.toolbar-dropdown-toolbar,
|
1121
|
+
.toolbar-dropdown-toolbar,
|
1122
|
+
.toolbar-dropdown-toolbar .toolbar-dropdown {
|
1119
1123
|
background-color: var(--background-color-3);
|
1120
1124
|
color: var(--foreground-color-3);
|
1121
1125
|
}
|
@@ -1309,14 +1313,16 @@
|
|
1309
1313
|
.toolbar-help-overlay .navigation-buttons > button:disabled {
|
1310
1314
|
opacity: 0.5;
|
1311
1315
|
}
|
1312
|
-
.toolbar-help-overlay .navigation-buttons > .next,
|
1316
|
+
.toolbar-help-overlay .navigation-buttons > .next,
|
1317
|
+
.toolbar-help-overlay .navigation-buttons > .previous {
|
1313
1318
|
font-size: 1em;
|
1314
1319
|
padding: 10px;
|
1315
1320
|
transition: 0.2s ease font-size;
|
1316
1321
|
z-index: 3;
|
1317
1322
|
}
|
1318
1323
|
@media (prefers-reduced-motion: reduce) {
|
1319
|
-
.toolbar-help-overlay .navigation-buttons > .next,
|
1324
|
+
.toolbar-help-overlay .navigation-buttons > .next,
|
1325
|
+
.toolbar-help-overlay .navigation-buttons > .previous {
|
1320
1326
|
transition: none;
|
1321
1327
|
}
|
1322
1328
|
}
|
@@ -1419,7 +1425,8 @@
|
|
1419
1425
|
animation: var(--fade-out-animation);
|
1420
1426
|
opacity: 0;
|
1421
1427
|
}
|
1422
|
-
.ScrollbarTool-overlay .vertical-scrollbar,
|
1428
|
+
.ScrollbarTool-overlay .vertical-scrollbar,
|
1429
|
+
.ScrollbarTool-overlay .horizontal-scrollbar {
|
1423
1430
|
width: var(--scrollbar-size);
|
1424
1431
|
height: var(--scrollbar-size);
|
1425
1432
|
min-width: var(--scrollbar-size);
|
@@ -1428,7 +1435,8 @@
|
|
1428
1435
|
border-radius: var(--scrollbar-size);
|
1429
1436
|
position: absolute;
|
1430
1437
|
}
|
1431
|
-
.ScrollbarTool-overlay .vertical-scrollbar.represents-no-scroll,
|
1438
|
+
.ScrollbarTool-overlay .vertical-scrollbar.represents-no-scroll,
|
1439
|
+
.ScrollbarTool-overlay .horizontal-scrollbar.represents-no-scroll {
|
1432
1440
|
animation: var(--fade-out-animation);
|
1433
1441
|
opacity: 0;
|
1434
1442
|
}
|
@@ -1531,7 +1539,8 @@
|
|
1531
1539
|
touch-action: none;
|
1532
1540
|
direction: ltr;
|
1533
1541
|
}
|
1534
|
-
.overlay.handleOverlay,
|
1542
|
+
.overlay.handleOverlay,
|
1543
|
+
.overlay.handleOverlay .selection-tool-selection-outer-container {
|
1535
1544
|
height: 0;
|
1536
1545
|
overflow: visible;
|
1537
1546
|
}
|
@@ -1584,7 +1593,8 @@
|
|
1584
1593
|
margin-top: 1px;
|
1585
1594
|
}
|
1586
1595
|
|
1587
|
-
.js-draw-sound-ui-toggle:focus-within,
|
1596
|
+
.js-draw-sound-ui-toggle:focus-within,
|
1597
|
+
.js-draw-sound-ui-toggle.sound-ui-tool-enabled {
|
1588
1598
|
overflow: visible;
|
1589
1599
|
z-index: 5;
|
1590
1600
|
}
|
@@ -1633,6 +1643,8 @@
|
|
1633
1643
|
justify-content: start;
|
1634
1644
|
cursor: pointer;
|
1635
1645
|
padding: 5px;
|
1646
|
+
padding-top: 6px;
|
1647
|
+
padding-bottom: 6px;
|
1636
1648
|
background-color: var(--background-color-1);
|
1637
1649
|
color: var(--foreground-color-1);
|
1638
1650
|
--icon-color: currentColor;
|
@@ -1732,7 +1744,8 @@
|
|
1732
1744
|
}
|
1733
1745
|
|
1734
1746
|
/* Coloris: Try to avoid scrolling instead of updating the color input. */
|
1735
|
-
#clr-picker #clr-color-area,
|
1747
|
+
#clr-picker #clr-color-area,
|
1748
|
+
#clr-picker .clr_hue {
|
1736
1749
|
touch-action: none;
|
1737
1750
|
}
|
1738
1751
|
|