- Fix (Embedded API): Cross-domain may fail to even access origin or contentDocument
- Fix (Embedded API): Avoid adding URL to iframe src if there are no arguments - Fix (Cross-domain usage): Recover from exceptions with `localStorage` - Docs (JSDoc): Missing function
This commit is contained in:
23
dist/index-es.js
vendored
23
dist/index-es.js
vendored
@@ -19832,6 +19832,11 @@ var SvgCanvas = function SvgCanvas(container, config) {
|
||||
$$9('#cmenu_canvas').enableContextMenuItems('#paste,#paste_in_place');
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {"in_place"|"point"|undefined} type
|
||||
* @param {Number|undefined} x Expected if type is "point"
|
||||
* @param {Number|undefined} y Expected if type is "point"
|
||||
*/
|
||||
this.pasteElements = function (type, x, y) {
|
||||
var cb = JSON.parse(localStorage.getItem('svgedit_clipboard'));
|
||||
var len = cb.length;
|
||||
@@ -30302,11 +30307,21 @@ editor.init = function () {
|
||||
$$b('#cmenu_canvas li').disableContextMenu();
|
||||
canvMenu.enableContextMenuItems('#delete,#cut,#copy');
|
||||
|
||||
canvMenu[(localStorage.getItem('svgedit_clipboard') ? 'en' : 'dis') + 'ableContextMenuItems']('#paste,#paste_in_place');
|
||||
window.addEventListener('storage', function (e) {
|
||||
if (e.key !== 'svgedit_clipboard') return;
|
||||
function enableOrDisableClipboard() {
|
||||
var svgeditClipboard = void 0;
|
||||
try {
|
||||
svgeditClipboard = localStorage.getItem('svgedit_clipboard');
|
||||
} catch (err) {}
|
||||
canvMenu[(svgeditClipboard ? 'en' : 'dis') + 'ableContextMenuItems']('#paste,#paste_in_place');
|
||||
}
|
||||
enableOrDisableClipboard();
|
||||
|
||||
canvMenu[(localStorage.getItem('svgedit_clipboard') ? 'en' : 'dis') + 'ableContextMenuItems']('#paste,#paste_in_place');
|
||||
window.addEventListener('storage', function (e) {
|
||||
if (e.key !== 'svgedit_clipboard') {
|
||||
return;
|
||||
}
|
||||
|
||||
enableOrDisableClipboard();
|
||||
});
|
||||
|
||||
window.addEventListener('beforeunload', function (e) {
|
||||
|
||||
2
dist/index-es.min.js
vendored
2
dist/index-es.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index-es.min.js.map
vendored
2
dist/index-es.min.js.map
vendored
File diff suppressed because one or more lines are too long
23
dist/index-umd.js
vendored
23
dist/index-umd.js
vendored
@@ -19838,6 +19838,11 @@
|
||||
$$9('#cmenu_canvas').enableContextMenuItems('#paste,#paste_in_place');
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {"in_place"|"point"|undefined} type
|
||||
* @param {Number|undefined} x Expected if type is "point"
|
||||
* @param {Number|undefined} y Expected if type is "point"
|
||||
*/
|
||||
this.pasteElements = function (type, x, y) {
|
||||
var cb = JSON.parse(localStorage.getItem('svgedit_clipboard'));
|
||||
var len = cb.length;
|
||||
@@ -30308,11 +30313,21 @@
|
||||
$$b('#cmenu_canvas li').disableContextMenu();
|
||||
canvMenu.enableContextMenuItems('#delete,#cut,#copy');
|
||||
|
||||
canvMenu[(localStorage.getItem('svgedit_clipboard') ? 'en' : 'dis') + 'ableContextMenuItems']('#paste,#paste_in_place');
|
||||
window.addEventListener('storage', function (e) {
|
||||
if (e.key !== 'svgedit_clipboard') return;
|
||||
function enableOrDisableClipboard() {
|
||||
var svgeditClipboard = void 0;
|
||||
try {
|
||||
svgeditClipboard = localStorage.getItem('svgedit_clipboard');
|
||||
} catch (err) {}
|
||||
canvMenu[(svgeditClipboard ? 'en' : 'dis') + 'ableContextMenuItems']('#paste,#paste_in_place');
|
||||
}
|
||||
enableOrDisableClipboard();
|
||||
|
||||
canvMenu[(localStorage.getItem('svgedit_clipboard') ? 'en' : 'dis') + 'ableContextMenuItems']('#paste,#paste_in_place');
|
||||
window.addEventListener('storage', function (e) {
|
||||
if (e.key !== 'svgedit_clipboard') {
|
||||
return;
|
||||
}
|
||||
|
||||
enableOrDisableClipboard();
|
||||
});
|
||||
|
||||
window.addEventListener('beforeunload', function (e) {
|
||||
|
||||
2
dist/index-umd.min.js
vendored
2
dist/index-umd.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index-umd.min.js.map
vendored
2
dist/index-umd.min.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user