Comparing version 1.20.2 to 1.20.3
@@ -16,3 +16,5 @@ "use strict"; | ||
exports.makePolylineBuilder = (0, makeShapeFitAutocorrect_1.default)((initialPoint, viewport) => { | ||
const minFit = viewport.getSizeOfPixelOnCanvas(); | ||
// Fit to a value slightly smaller than the pixel size. A larger value can | ||
// cause the stroke to appear jagged at some zoom levels. | ||
const minFit = viewport.getSizeOfPixelOnCanvas() * 0.75; | ||
return new PolylineBuilder(initialPoint, minFit, viewport); | ||
@@ -87,3 +89,3 @@ }); | ||
getMinFit() { | ||
let minFit = Math.min(this.minFitAllowed, this.averageWidth / 3); | ||
let minFit = Math.min(this.minFitAllowed, this.averageWidth / 4); | ||
if (minFit < 1e-10) { | ||
@@ -90,0 +92,0 @@ minFit = this.minFitAllowed; |
@@ -39,3 +39,3 @@ "use strict"; | ||
const Display_1 = __importStar(require("./rendering/Display")); | ||
const SVGLoader_1 = __importDefault(require("./SVGLoader")); | ||
const SVGLoader_1 = __importDefault(require("./SVGLoader/SVGLoader")); | ||
const Pointer_1 = __importDefault(require("./Pointer")); | ||
@@ -42,0 +42,0 @@ const getLocalizationTable_1 = __importDefault(require("./localizations/getLocalizationTable")); |
@@ -9,3 +9,3 @@ "use strict"; | ||
const SVGRenderer_1 = __importDefault(require("../../rendering/renderers/SVGRenderer")); | ||
const SVGLoader_1 = require("../../SVGLoader"); | ||
const SVGLoader_1 = require("../../SVGLoader/SVGLoader"); | ||
const adjustExportedSVGSize_1 = __importDefault(require("./adjustExportedSVGSize")); | ||
@@ -12,0 +12,0 @@ const toSVGInternal = (image, renderFunction, options) => { |
@@ -23,3 +23,3 @@ /** | ||
export * from './localization'; | ||
export { default as SVGLoader } from './SVGLoader'; | ||
export { default as SVGLoader } from './SVGLoader/SVGLoader'; | ||
export { default as Viewport } from './Viewport'; | ||
@@ -26,0 +26,0 @@ export * from '@js-draw/math'; |
@@ -46,3 +46,3 @@ "use strict"; | ||
__exportStar(require("./localization"), exports); | ||
var SVGLoader_1 = require("./SVGLoader"); | ||
var SVGLoader_1 = require("./SVGLoader/SVGLoader"); | ||
Object.defineProperty(exports, "SVGLoader", { enumerable: true, get: function () { return __importDefault(SVGLoader_1).default; } }); | ||
@@ -49,0 +49,0 @@ var Viewport_1 = require("./Viewport"); |
@@ -8,3 +8,3 @@ "use strict"; | ||
const math_1 = require("@js-draw/math"); | ||
const SVGLoader_1 = require("../../SVGLoader"); | ||
const SVGLoader_1 = require("../../SVGLoader/SVGLoader"); | ||
const RenderingStyle_1 = require("../RenderingStyle"); | ||
@@ -11,0 +11,0 @@ const AbstractRenderer_1 = __importDefault(require("./AbstractRenderer")); |
@@ -33,3 +33,3 @@ "use strict"; | ||
const ActionButtonWidget_1 = __importDefault(require("./widgets/ActionButtonWidget")); | ||
const InsertImageWidget_1 = __importDefault(require("./widgets/InsertImageWidget")); | ||
const InsertImageWidget_1 = __importDefault(require("./widgets/InsertImageWidget/InsertImageWidget")); | ||
const DocumentPropertiesWidget_1 = __importDefault(require("./widgets/DocumentPropertiesWidget")); | ||
@@ -36,0 +36,0 @@ const math_1 = require("@js-draw/math"); |
@@ -9,3 +9,3 @@ export { default as ActionButtonWidget } from './ActionButtonWidget'; | ||
export { default as EraserToolWidget } from './EraserToolWidget'; | ||
export { default as InsertImageWidget } from './InsertImageWidget'; | ||
export { default as InsertImageWidget } from './InsertImageWidget/InsertImageWidget'; | ||
export { default as DocumentPropertiesWidget } from './DocumentPropertiesWidget'; |
@@ -24,5 +24,5 @@ "use strict"; | ||
Object.defineProperty(exports, "EraserToolWidget", { enumerable: true, get: function () { return __importDefault(EraserToolWidget_1).default; } }); | ||
var InsertImageWidget_1 = require("./InsertImageWidget"); | ||
var InsertImageWidget_1 = require("./InsertImageWidget/InsertImageWidget"); | ||
Object.defineProperty(exports, "InsertImageWidget", { enumerable: true, get: function () { return __importDefault(InsertImageWidget_1).default; } }); | ||
var DocumentPropertiesWidget_1 = require("./DocumentPropertiesWidget"); | ||
Object.defineProperty(exports, "DocumentPropertiesWidget", { enumerable: true, get: function () { return __importDefault(DocumentPropertiesWidget_1).default; } }); |
@@ -7,3 +7,3 @@ "use strict"; | ||
const TextComponent_1 = __importDefault(require("../components/TextComponent")); | ||
const SVGLoader_1 = __importDefault(require("../SVGLoader")); | ||
const SVGLoader_1 = __importDefault(require("../SVGLoader/SVGLoader")); | ||
const math_1 = require("@js-draw/math"); | ||
@@ -10,0 +10,0 @@ const BaseTool_1 = __importDefault(require("./BaseTool")); |
@@ -58,4 +58,2 @@ import Editor from '../Editor'; | ||
insertToolsBefore(insertBefore: BaseTool, toolsToInsert: BaseTool[]): void; | ||
/** @internal */ | ||
changeActiveToolTo(tool: BaseTool): void; | ||
private onEventInternal; | ||
@@ -62,0 +60,0 @@ /** Alias for {@link dispatchInputEvent}. */ |
@@ -213,9 +213,2 @@ "use strict"; | ||
} | ||
/** @internal */ | ||
changeActiveToolTo(tool) { | ||
if (!tool.isEnabled()) { | ||
tool.setEnabled(true); | ||
} | ||
this.activeTool = tool; | ||
} | ||
// @internal use `dispatchEvent` rather than calling `onEvent` directly. | ||
@@ -222,0 +215,0 @@ onEventInternal(event) { |
@@ -9,3 +9,3 @@ "use strict"; | ||
exports.default = { | ||
number: '1.20.2', | ||
number: '1.20.3', | ||
}; |
@@ -23,3 +23,3 @@ /** | ||
export * from './localization'; | ||
export { default as SVGLoader } from './SVGLoader'; | ||
export { default as SVGLoader } from './SVGLoader/SVGLoader'; | ||
export { default as Viewport } from './Viewport'; | ||
@@ -26,0 +26,0 @@ export * from '@js-draw/math'; |
@@ -9,3 +9,3 @@ export { default as ActionButtonWidget } from './ActionButtonWidget'; | ||
export { default as EraserToolWidget } from './EraserToolWidget'; | ||
export { default as InsertImageWidget } from './InsertImageWidget'; | ||
export { default as InsertImageWidget } from './InsertImageWidget/InsertImageWidget'; | ||
export { default as DocumentPropertiesWidget } from './DocumentPropertiesWidget'; |
@@ -58,4 +58,2 @@ import Editor from '../Editor'; | ||
insertToolsBefore(insertBefore: BaseTool, toolsToInsert: BaseTool[]): void; | ||
/** @internal */ | ||
changeActiveToolTo(tool: BaseTool): void; | ||
private onEventInternal; | ||
@@ -62,0 +60,0 @@ /** Alias for {@link dispatchInputEvent}. */ |
{ | ||
"name": "js-draw", | ||
"version": "1.20.2", | ||
"version": "1.20.3", | ||
"description": "Draw pictures using a pen, touchscreen, or mouse! JS-draw is a drawing library for JavaScript and TypeScript. ", | ||
@@ -28,2 +28,3 @@ "types": "./dist/mjs/lib.d.ts", | ||
"types": "./dist/mjs/Editor.d.ts", | ||
"require": "./dist/cjs/Editor.js", | ||
"default": "./dist/mjs/Editor.mjs" | ||
@@ -90,3 +91,3 @@ }, | ||
], | ||
"gitHead": "ee6b7aaf1c93f3e6a6b28ae694f7e46bd3026be1" | ||
"gitHead": "43382107b39bc9c7c0cf16e83d8b0e2bb82af615" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4300859
59809