Comparing version 1.13.1 to 1.13.2
@@ -45,3 +45,3 @@ "use strict"; | ||
const untilNextAnimationFrame_1 = __importDefault(require("./util/untilNextAnimationFrame")); | ||
const fileToBase64_1 = __importDefault(require("./util/fileToBase64")); | ||
const fileToBase64Url_1 = __importDefault(require("./util/fileToBase64Url")); | ||
const uniteCommands_1 = __importDefault(require("./commands/uniteCommands")); | ||
@@ -480,3 +480,3 @@ const SelectionTool_1 = __importDefault(require("./tools/SelectionTool/SelectionTool")); | ||
try { | ||
const data = await (0, fileToBase64_1.default)(file, onprogress); | ||
const data = await (0, fileToBase64Url_1.default)(file, { onprogress }); | ||
if (data && this.toolController.dispatchInputEvent({ | ||
@@ -483,0 +483,0 @@ kind: inputEvents_1.InputEvtType.PasteEvent, |
@@ -12,3 +12,3 @@ "use strict"; | ||
const math_1 = require("@js-draw/math"); | ||
const fileToBase64_1 = __importDefault(require("../../util/fileToBase64")); | ||
const fileToBase64Url_1 = __importDefault(require("../../util/fileToBase64Url")); | ||
const BaseWidget_1 = __importDefault(require("./BaseWidget")); | ||
@@ -115,7 +115,9 @@ const types_1 = require("../../types"); | ||
let data = null; | ||
let errorMessage = null; | ||
try { | ||
data = await (0, fileToBase64_1.default)(image); | ||
data = await (0, fileToBase64Url_1.default)(image); | ||
} | ||
catch (e) { | ||
this.statusView.innerText = this.localizationTable.imageLoadError(e); | ||
catch (error) { | ||
console.error('Image load error', error); | ||
errorMessage = this.localizationTable.imageLoadError(error); | ||
} | ||
@@ -129,2 +131,7 @@ if (data) { | ||
this.onImageDataUpdate(); | ||
// Show the error after image update callbacks to ensure it is | ||
// actually shown. | ||
if (errorMessage) { | ||
this.statusView.innerText = errorMessage; | ||
} | ||
}); | ||
@@ -131,0 +138,0 @@ altTextRow.replaceChildren(imageAltTextLabel, this.imageAltTextInput); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = { | ||
number: '1.13.1', | ||
number: '1.13.2', | ||
}; |
{ | ||
"name": "js-draw", | ||
"version": "1.13.1", | ||
"version": "1.13.2", | ||
"description": "Draw pictures using a pen, touchscreen, or mouse! JS-draw is a drawing library for JavaScript and TypeScript. ", | ||
@@ -89,3 +89,3 @@ "types": "./dist/mjs/lib.d.ts", | ||
], | ||
"gitHead": "814f5d57897fd16fd45860522d9ecbc6b8b04a38" | ||
"gitHead": "9a48e4d746783977e2b2808be9d97f3521fb830f" | ||
} |
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
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
3894940
748
53347