js-draw 0.15.2 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/translation.yml +56 -0
- package/CHANGELOG.md +12 -0
- package/dist/bundle.js +1 -1
- package/dist/src/Editor.d.ts +11 -0
- package/dist/src/Editor.js +52 -4
- package/dist/src/EditorImage.d.ts +11 -11
- package/dist/src/EditorImage.js +54 -18
- package/dist/src/SVGLoader.js +6 -0
- package/dist/src/Viewport.d.ts +5 -0
- package/dist/src/Viewport.js +11 -0
- package/dist/src/components/AbstractComponent.d.ts +1 -0
- package/dist/src/components/AbstractComponent.js +5 -0
- package/dist/src/components/ImageBackground.d.ts +2 -1
- package/dist/src/components/ImageBackground.js +8 -1
- package/dist/src/localizations/es.js +1 -1
- package/dist/src/toolbar/HTMLToolbar.d.ts +26 -2
- package/dist/src/toolbar/HTMLToolbar.js +130 -15
- package/dist/src/toolbar/IconProvider.d.ts +2 -0
- package/dist/src/toolbar/IconProvider.js +44 -0
- package/dist/src/toolbar/localization.d.ts +5 -0
- package/dist/src/toolbar/localization.js +5 -0
- package/dist/src/toolbar/widgets/ActionButtonWidget.d.ts +3 -1
- package/dist/src/toolbar/widgets/ActionButtonWidget.js +5 -1
- package/dist/src/toolbar/widgets/BaseToolWidget.d.ts +1 -1
- package/dist/src/toolbar/widgets/BaseToolWidget.js +2 -1
- package/dist/src/toolbar/widgets/BaseWidget.d.ts +7 -2
- package/dist/src/toolbar/widgets/BaseWidget.js +23 -1
- package/dist/src/toolbar/widgets/DocumentPropertiesWidget.d.ts +19 -0
- package/dist/src/toolbar/widgets/DocumentPropertiesWidget.js +135 -0
- package/dist/src/toolbar/widgets/OverflowWidget.d.ts +25 -0
- package/dist/src/toolbar/widgets/OverflowWidget.js +65 -0
- package/dist/src/toolbar/widgets/lib.d.ts +1 -0
- package/dist/src/toolbar/widgets/lib.js +1 -0
- package/dist/src/tools/PasteHandler.js +2 -2
- package/dist/src/tools/SelectionTool/Selection.d.ts +2 -1
- package/dist/src/tools/SelectionTool/Selection.js +2 -1
- package/dist/src/tools/SelectionTool/SelectionTool.js +1 -1
- package/package.json +1 -1
- package/src/Editor.css +4 -0
- package/src/Editor.loadFrom.test.ts +24 -0
- package/src/Editor.ts +59 -4
- package/src/EditorImage.ts +66 -23
- package/src/SVGLoader.test.ts +57 -0
- package/src/SVGLoader.ts +7 -0
- package/src/Viewport.ts +13 -0
- package/src/components/AbstractComponent.ts +6 -0
- package/src/components/ImageBackground.test.ts +35 -0
- package/src/components/ImageBackground.ts +10 -1
- package/src/localizations/es.ts +8 -0
- package/src/math/Mat33.test.ts +30 -5
- package/src/rendering/renderers/CanvasRenderer.ts +1 -1
- package/src/toolbar/HTMLToolbar.ts +169 -16
- package/src/toolbar/IconProvider.ts +46 -0
- package/src/toolbar/localization.ts +10 -0
- package/src/toolbar/toolbar.css +2 -0
- package/src/toolbar/widgets/ActionButtonWidget.ts +5 -0
- package/src/toolbar/widgets/BaseToolWidget.ts +3 -1
- package/src/toolbar/widgets/BaseWidget.ts +34 -2
- package/src/toolbar/widgets/DocumentPropertiesWidget.ts +185 -0
- package/src/toolbar/widgets/OverflowWidget.css +9 -0
- package/src/toolbar/widgets/OverflowWidget.ts +83 -0
- package/src/toolbar/widgets/lib.ts +2 -1
- package/src/tools/PasteHandler.ts +3 -2
- package/src/tools/SelectionTool/Selection.ts +2 -1
- package/src/tools/SelectionTool/SelectionTool.ts +1 -1
@@ -221,6 +221,46 @@ body:
|
|
221
221
|
placeholder: "Selection tool: Use arrow keys to move selected items, lowercase/uppercase ‘i’ and ‘o’ to resize."
|
222
222
|
validations:
|
223
223
|
required: false
|
224
|
+
- type: input
|
225
|
+
id: translation-documentProperties
|
226
|
+
attributes:
|
227
|
+
label: "documentProperties"
|
228
|
+
description: "Translate `Document`."
|
229
|
+
placeholder: "Document"
|
230
|
+
validations:
|
231
|
+
required: false
|
232
|
+
- type: input
|
233
|
+
id: translation-backgroundColor
|
234
|
+
attributes:
|
235
|
+
label: "backgroundColor"
|
236
|
+
description: "Translate `Background Color: `."
|
237
|
+
placeholder: "Background Color: "
|
238
|
+
validations:
|
239
|
+
required: false
|
240
|
+
- type: input
|
241
|
+
id: translation-imageWidthOption
|
242
|
+
attributes:
|
243
|
+
label: "imageWidthOption"
|
244
|
+
description: "Translate `Width: `."
|
245
|
+
placeholder: "Width: "
|
246
|
+
validations:
|
247
|
+
required: false
|
248
|
+
- type: input
|
249
|
+
id: translation-imageHeightOption
|
250
|
+
attributes:
|
251
|
+
label: "imageHeightOption"
|
252
|
+
description: "Translate `Height: `."
|
253
|
+
placeholder: "Height: "
|
254
|
+
validations:
|
255
|
+
required: false
|
256
|
+
- type: input
|
257
|
+
id: translation-toggleOverflow
|
258
|
+
attributes:
|
259
|
+
label: "toggleOverflow"
|
260
|
+
description: "Translate `More`."
|
261
|
+
placeholder: "More"
|
262
|
+
validations:
|
263
|
+
required: false
|
224
264
|
- type: input
|
225
265
|
id: translation-touchPanning
|
226
266
|
attributes:
|
@@ -733,6 +773,22 @@ body:
|
|
733
773
|
placeholder: "Restyled elements"
|
734
774
|
validations:
|
735
775
|
required: false
|
776
|
+
- type: input
|
777
|
+
id: translation-emptyBackground
|
778
|
+
attributes:
|
779
|
+
label: "emptyBackground"
|
780
|
+
description: "Translate `Empty background`."
|
781
|
+
placeholder: "Empty background"
|
782
|
+
validations:
|
783
|
+
required: false
|
784
|
+
- type: input
|
785
|
+
id: translation-filledBackgroundWithColor
|
786
|
+
attributes:
|
787
|
+
label: "filledBackgroundWithColor"
|
788
|
+
description: "Translate ``(color) => `Filled background (${color})` ``."
|
789
|
+
placeholder: "(color) => `Filled background (${color})`"
|
790
|
+
validations:
|
791
|
+
required: false
|
736
792
|
- type: input
|
737
793
|
id: translation-text
|
738
794
|
attributes:
|
package/CHANGELOG.md
CHANGED
@@ -1,9 +1,21 @@
|
|
1
|
+
# 0.16.1
|
2
|
+
* Bug fixes
|
3
|
+
- Fix editor not shrinking vertically in Chromium-based browsers with its container.
|
4
|
+
- Fixes an issue where (on some devices), `tspan`s could grow in font-size when loading from an SVG.
|
5
|
+
- Fix spacers not added in the correct locations in the toolbar.
|
6
|
+
|
7
|
+
# 0.16.0
|
8
|
+
* Configurable background color.
|
9
|
+
* Toolbar buttons are moved to an overflow menu instead of creating a second (or third) line of buttons.
|
10
|
+
- Buttons are still moved to a second row on tall screens.
|
11
|
+
|
1
12
|
# 0.15.2
|
2
13
|
* Bug fixes
|
3
14
|
* Don't select/erase objects that have `isSelectable` set to `false`.
|
4
15
|
- Previously, some objects used to store information about the image (e.g. attributes on the root `svg` object) could be selected and erased.
|
5
16
|
* Round points created by rectangle, arrow, and line tools to prevent unnecessary decimal places in the output.
|
6
17
|
* Performance improvement while zooming in on strokes.
|
18
|
+
* Fix view jumping while zooming in/rotating with touchscreen pan tool.
|
7
19
|
|
8
20
|
# 0.15.1
|
9
21
|
* Bug fixes
|