Lines Matching refs:editorUi

36 			this.editorUi.hideCurrentMenu();
37 this.editorUi.openLink(href);
56 var editorUi = this.editorUi;
57 var graph = editorUi.editor.graph;
71 if (!mxClient.IS_SVG && !editorUi.isOffline())
85 editorUi.actions.addAction('new...', function()
87 var compact = editorUi.isOffline();
89 if (!compact && urlParams['newTempDlg'] == '1' && editorUi.mode == App.MODE_GOOGLE)
97 var tempDlg = new TemplatesDialog(editorUi, function(templateXml, title, infoObj)
101 editorUi.pickFolder(editorUi.mode, function(folderId)
103 editorUi.createFile(title, templateXml, (templateLibs != null &&
106 editorUi.hideDialog();
109 }, editorUi.stateArg == null ||
110 editorUi.stateArg.folderId == null);
117 editorUi.drive.listFiles(null, oneWeek, username? true : false, function(resp)
130 editorUi.drive.listFiles(str, null, username? true : false, function(resp)
143 editorUi.drive.getFile(obj.id, function(file)
149editorUi.showDialog(tempDlg.container, window.innerWidth, window.innerHeight, true, false, null, f…
154 …var dlg = new NewDialog(editorUi, compact, !(editorUi.mode == App.MODE_DEVICE && 'chooseFileSystem…
156editorUi.showDialog(dlg.container, (compact) ? 350 : 620, (compact) ? 70 : 460, true, true, functi…
158 editorUi.sidebar.hideTooltip();
160 if (cancel && editorUi.getCurrentFile() == null)
162 editorUi.showSplash();
169 editorUi.actions.put('insertTemplate', new Action(mxResources.get('template') + '...', function()
173 var dlg = new NewDialog(editorUi, null, false, function(xml)
175 editorUi.hideDialog();
179 var insertPoint = editorUi.editor.graph.getFreeInsertPoint();
180 graph.setSelectionCells(editorUi.importXml(xml,
189 editorUi.showDialog(dlg.container, 620, 460, true, true, function()
191 editorUi.sidebar.hideTooltip();
198 var pointAction = editorUi.actions.addAction('points', function()
200 editorUi.editor.graph.view.setUnit(mxConstants.POINTS);
204 …pointAction.setSelectedCallback(function() { return editorUi.editor.graph.view.unit == mxConstants…
206 var inchAction = editorUi.actions.addAction('inches', function()
208 editorUi.editor.graph.view.setUnit(mxConstants.INCHES);
212 …inchAction.setSelectedCallback(function() { return editorUi.editor.graph.view.unit == mxConstants.…
214 var mmAction = editorUi.actions.addAction('millimeters', function()
216 editorUi.editor.graph.view.setUnit(mxConstants.MILLIMETERS);
220 …mmAction.setSelectedCallback(function() { return editorUi.editor.graph.view.unit == mxConstants.MI…
222 var meterAction = editorUi.actions.addAction('meters', function()
224 editorUi.editor.graph.view.setUnit(mxConstants.METERS);
228 …meterAction.setSelectedCallback(function() { return editorUi.editor.graph.view.unit == mxConstants…
235 var rulerAction = editorUi.actions.addAction('ruler', function()
240 if (editorUi.ruler != null)
242 editorUi.ruler.destroy();
243 editorUi.ruler = null;
244 editorUi.refresh();
248 editorUi.ruler = new mxDualRuler(editorUi, editorUi.editor.graph.view.unit);
249 editorUi.refresh();
252 rulerAction.setEnabled(editorUi.canvasSupported && document.documentMode != 9);
254 rulerAction.setSelectedCallback(function() { return editorUi.ruler != null; });
256 var fullscreenAction = editorUi.actions.addAction('fullscreen', function()
260 editorUi.setInlineFullscreen(!Editor.inlineFullscreen);
284 editorUi.actions.addAction('properties...', function()
286 var dlg = new FilePropertiesDialog(editorUi);
287 editorUi.showDialog(dlg.container, 320, 120, true, true);
293editorUi.actions.put('insertFreehand', new Action(mxResources.get('freehand') + '...', function(ev…
299 … this.freehandWindow = new FreehandWindow(editorUi, document.body.offsetWidth - 420, 102, 176, 84);
319 editorUi.actions.put('exportXml', new Action(mxResources.get('formatXml') + '...', function()
323 var noPages = editorUi.pages == null || editorUi.pages.length <= 1;
330 var selection = editorUi.addCheckbox(div, mxResources.get('selectionOnly'),
332 var compressed = editorUi.addCheckbox(div, mxResources.get('compressed'), true);
333 var pages = editorUi.addCheckbox(div, mxResources.get('allPages'), !noPages, noPages);
348 var dlg = new CustomDialog(editorUi, div, mxUtils.bind(this, function()
350 editorUi.downloadFile('xml', !compressed.checked, null,
354 editorUi.showDialog(dlg.container, 300, 200, true, true);
359 editorUi.actions.put('exportUrl', new Action(mxResources.get('url') + '...', function()
361 editorUi.showPublishLinkDialog(mxResources.get('url'), true, null, null,
371 var dlg = new EmbedDialog(editorUi, editorUi.createLink(linkTarget, linkColor,
373 editorUi.showDialog(dlg.container, 450, 240, true, true);
379editorUi.actions.put('exportHtml', new Action(mxResources.get('formatHtmlEmbedded') + '...', funct…
381 if (editorUi.spinner.spin(document.body, mxResources.get('loading')))
383 editorUi.getPublicUrl(editorUi.getCurrentFile(), function(url)
385 editorUi.spinner.stop();
387 editorUi.showHtmlDialog(mxResources.get('export'), null, url, function(publicUrl, zoomEnabled,
390 editorUi.createHtml(publicUrl, zoomEnabled, initialZoom, linkTarget, linkColor, fit, allPages,
393 var basename = editorUi.getBaseFilename(allPages);
397 editorUi.saveData(basename + ((basename.substring(basename.lenth - 7) ==
405 editorUi.actions.put('exportPdf', new Action(mxResources.get('formatPdf') + '...', function()
407 if (!EditorUi.isElectronApp && (editorUi.isOffline() || editorUi.printPdfExport))
410 editorUi.showDialog(new PrintDialog(editorUi, mxResources.get('formatPdf')).container, 360,
411 (editorUi.pages != null && editorUi.pages.length > 1 && (editorUi.editor.editable ||
417 var noPages = editorUi.pages == null || editorUi.pages.length <= 1;
444 if (editorUi.pdfPageExport && !noPages)
446 var allPages = editorUi.addRadiobox(div, 'pages', mxResources.get('allPages'), true);
447 …var pagesRadio = editorUi.addRadiobox(div, 'pages', mxResources.get('pages') + ':', false, null, t…
483 if (editorUi.pages != null)
485 pageCount = editorUi.pages.length;
487 if (editorUi.currentPage != null)
489 for (var i = 0; i < editorUi.pages.length; i++)
491 if (editorUi.currentPage == editorUi.pages[i])
506 …var selection = editorUi.addRadiobox(div, 'pages', mxResources.get('selectionOnly'), false, graph.…
507 var crop = editorUi.addCheckbox(div, mxResources.get('crop'), false, true);
508 var grid = editorUi.addCheckbox(div, mxResources.get('grid'), false, false);
517 var selection = editorUi.addCheckbox(div, mxResources.get('selectionOnly'),
519 var crop = editorUi.addCheckbox(div, mxResources.get('crop'),
520 !graph.pageVisible || !editorUi.pdfPageExport,
521 !editorUi.pdfPageExport);
522 var grid = editorUi.addCheckbox(div, mxResources.get('grid'), false, false);
525 if (!editorUi.pdfPageExport)
532 editorUi.getServiceName() == 'draw.io';
538 include = editorUi.addCheckbox(div, mxResources.get('includeCopyOfMyDiagram'),
545 transparentBkg = editorUi.addCheckbox(div,
551 var dlg = new CustomDialog(editorUi, div, mxUtils.bind(this, function()
565 editorUi.downloadFile('pdf', null, null, !selection.checked,
570 editorUi.showDialog(dlg.container, 300, dlgH, true, true);
574 editorUi.actions.addAction('open...', function()
576 editorUi.pickFile();
579 editorUi.actions.addAction('close', function()
581 var currentFile = editorUi.getCurrentFile();
590 editorUi.fileLoaded(null);
595 editorUi.confirm(mxResources.get('allChangesLost'), null, fn,
604 editorUi.actions.addAction('editShape...', mxUtils.bind(this, function()
615 var dlg = new EditShapeDialog(editorUi, cell, mxResources.get('editShape') + ':', 630, 400);
616 editorUi.showDialog(dlg.container, 640, 480, true, false);
622 editorUi.actions.addAction('revisionHistory...', function()
624 if (!editorUi.isRevisionHistorySupported())
626editorUi.showError(mxResources.get('error'), mxResources.get('notAvailable'), mxResources.get('ok'…
628 else if (editorUi.spinner.spin(document.body, mxResources.get('loading')))
630 editorUi.getRevisions(mxUtils.bind(this, function(revs, restoreFn)
632 editorUi.spinner.stop();
633 var dlg = new RevisionDialog(editorUi, revs, restoreFn);
634 editorUi.showDialog(dlg.container, 640, 480, true, true);
638 editorUi.handleError(err);
643 editorUi.actions.addAction('createRevision', function()
645 editorUi.actions.get('save').funct();
648 var action = editorUi.actions.addAction('synchronize', function()
650 editorUi.synchronizeCurrentFile(DrawioFile.SYNC == 'none');
659 editorUi.actions.addAction('upload...', function()
661 var file = editorUi.getCurrentFile();
667 window.drawdata = editorUi.getFileData();
668 var filename = (file.getTitle() != null) ? file.getTitle() : editorUi.defaultFilename;
669editorUi.openLink(window.location.protocol + '//' + window.location.host + '/?create=drawdata&' +
670 ((editorUi.mode == App.MODE_DROPBOX) ? 'mode=dropbox&' : '') +
677 var action = editorUi.actions.addAction('mathematicalTypesetting', function()
679 var change = new ChangePageSetup(editorUi);
682 change.mathEnabled = !editorUi.isMathEnabled();
688 action.setSelectedCallback(function() { return editorUi.isMathEnabled(); });
694 var action = editorUi.actions.addAction('showStartScreen', function()
704 var autosaveAction = editorUi.actions.addAction('autosave', function()
706 editorUi.editor.setAutosave(!editorUi.editor.autosave);
712 return autosaveAction.isEnabled() && editorUi.editor.autosave;
715 editorUi.actions.addAction('editGeometry...', function()
730 var dlg = new EditGeometryDialog(editorUi, vertices);
731 editorUi.showDialog(dlg.container, 200, 270, true, true);
738 editorUi.actions.addAction('copyStyle', function()
746 editorUi.actions.addAction('pasteStyle', function()
754editorUi.actions.put('pageBackgroundImage', new Action(mxResources.get('backgroundImage') + '...',…
756 if (!editorUi.isOffline())
760 editorUi.setBackgroundImage(image);
763 var dlg = new BackgroundImageDialog(editorUi, apply);
764 editorUi.showDialog(dlg.container, 320, 170, true, true);
769 editorUi.actions.put('exportSvg', new Action(mxResources.get('formatSvg') + '...', function()
771 editorUi.showExportDialog(mxResources.get('formatSvg'), true, mxResources.get('export'),
781 editorUi.exportSvg(val / 100, transparentBackground, ignoreSelection,
788 editorUi.actions.put('exportPng', new Action(mxResources.get('formatPng') + '...', function()
790 if (editorUi.isExportToCanvas())
792 editorUi.showExportDialog(mxResources.get('image'), false, mxResources.get('export'),
801 editorUi.exportImage(val / 100, transparentBackground, ignoreSelection,
807 else if (!editorUi.isOffline() && (!mxClient.IS_IOS || !navigator.standalone))
809editorUi.showRemoteExportDialog(mxResources.get('export'), null, mxUtils.bind(this, function(ignor…
811editorUi.downloadFile((editable) ? 'xmlpng' : 'png', null, null, ignoreSelection, null, null, tran…
816 editorUi.actions.put('exportJpg', new Action(mxResources.get('formatJpg') + '...', function()
818 if (editorUi.isExportToCanvas())
820 editorUi.showExportDialog(mxResources.get('image'), false, mxResources.get('export'),
829 editorUi.exportImage(val / 100, false, ignoreSelection,
835 else if (!editorUi.isOffline() && (!mxClient.IS_IOS || !navigator.standalone))
837editorUi.showRemoteExportDialog(mxResources.get('export'), null, mxUtils.bind(this, function(ignor…
839 editorUi.downloadFile('jpeg', null, null, ignoreSelection, null, null, null, scale, border);
844 action = editorUi.actions.addAction('copyAsImage', mxUtils.bind(this, function()
847 …var xml = mxUtils.getXml((cells.length == 0) ? editorUi.editor.getGraphXml() : graph.encodeCells(c…
848 editorUi.copyImage(cells, xml);
852 action.visible = Editor.enableNativeCipboard && editorUi.isExportToCanvas() && !mxClient.IS_SF;
854 action = editorUi.actions.put('shadowVisible', new Action(mxResources.get('shadow'), function()
861editorUi.actions.put('about', new Action(mxResources.get('about') + ' ' + EditorUi.VERSION + '...'…
863 if (editorUi.isOffline() || mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
865 editorUi.alert(editorUi.editor.appName + ' ' + EditorUi.VERSION);
869 editorUi.openLink('https://www.diagrams.net/');
873 editorUi.actions.addAction('support...', function()
877 editorUi.openLink('https://github.com/jgraph/drawio-desktop/wiki/Getting-Support');
881 editorUi.openLink('https://github.com/jgraph/drawio/wiki/Getting-Support');
885 editorUi.actions.addAction('exportOptionsDisabled...', function()
887 editorUi.handleError({message: mxResources.get('exportOptionsDisabledDetails')},
891 editorUi.actions.addAction('keyboardShortcuts...', function()
895 editorUi.openLink('shortcuts.svg');
899editorUi.openLink('https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg…
903 editorUi.actions.addAction('feedback...', function()
905 var dlg = new FeedbackDialog(editorUi);
906 editorUi.showDialog(dlg.container, 610, 360, true, false);
910 editorUi.actions.addAction('quickStart...', function()
912 editorUi.openLink('https://www.youtube.com/watch?v=Z0D96ZikMkc');
915 editorUi.actions.addAction('forkme', function()
919 editorUi.openLink('https://github.com/jgraph/drawio-desktop');
923 editorUi.openLink('https://github.com/jgraph/drawio');
927 editorUi.actions.addAction('downloadDesktop...', function()
929 editorUi.openLink('https://get.diagrams.net/');
932 action = editorUi.actions.addAction('tags', mxUtils.bind(this, function()
936 this.tagsWindow = new TagsWindow(editorUi, document.body.offsetWidth - 400, 60, 212, 200);
939 editorUi.fireEvent(new mxEventObject('tags'));
944 editorUi.fireEvent(new mxEventObject('tags'));
947 editorUi.fireEvent(new mxEventObject('tags'));
957 action = editorUi.actions.addAction('findReplace...', mxUtils.bind(this, function(arg1, evt)
967 this[name] = new FindWindow(editorUi,
972 editorUi.fireEvent(new mxEventObject(evtName));
976 editorUi.fireEvent(new mxEventObject(evtName));
993editorUi.actions.put('exportVsdx', new Action(mxResources.get('formatVsdx') + ' (beta)...', functi…
995 var noPages = editorUi.pages == null || editorUi.pages.length <= 1;
999 editorUi.exportVisio();
1011 var pages = editorUi.addCheckbox(div, mxResources.get('allPages'), !noPages, noPages);
1014 var dlg = new CustomDialog(editorUi, div, mxUtils.bind(this, function()
1016 editorUi.exportVisio(!pages.checked);
1019 editorUi.showDialog(dlg.container, 300, 130, true, true);
1025 editorUi.actions.addAction('configuration...', function()
1032 editorUi.confirm(mxResources.get('areYouSure'), function()
1044 editorUi.hideDialog();
1045 editorUi.alert(mxResources.get('restartForChangeRequired'));
1049 editorUi.handleError(e);
1064 '/' + editorUi.getSearch() + '#_CONFIG_' +
1066 var dlg = new EmbedDialog(editorUi, url);
1067 editorUi.showDialog(dlg.container, 450, 240, true);
1072 editorUi.handleError(e);
1077 editorUi.handleError({message: mxResources.get('invalidInput')});
1082 var dlg = new TextareaDialog(editorUi, mxResources.get('configuration') + ':',
1100 editorUi.hideDialog();
1101 editorUi.alert(mxResources.get('restartForChangeRequired'));
1105 editorUi.handleError(e);
1114 editorUi.showDialog(dlg.container, 620, 460, true, false);
1144 editorUi.alert(mxResources.get('restartForChangeRequired'));
1235 editorUi.customLayoutConfig = [{'layout': 'mxHierarchicalLayout',
1244 editorUi.actions.addAction('runLayout', function()
1246 var dlg = new TextareaDialog(editorUi, 'Run Layouts:',
1247 JSON.stringify(editorUi.customLayoutConfig, null, 2),
1255 editorUi.executeLayoutList(layoutList)
1256 editorUi.customLayoutConfig = layoutList;
1260 editorUi.handleError(e);
1273 editorUi.showDialog(dlg.container, 620, 460, true, true);
1291 editorUi.loadingOrgChart = false;
1292 editorUi.spinner.stop();
1296 var graph = editorUi.editor.graph;
1314 …if (typeof mxOrgChartLayout === 'undefined' && !editorUi.loadingOrgChart && !editorUi.isOffline(tr…
1316 if (editorUi.spinner.spin(document.body, mxResources.get('loading')))
1318 editorUi.loadingOrgChart = true;
1429 var dlg = new CustomDialog(editorUi, div, function()
1439 editorUi.showDialog(dlg.container, 355, 140, true, true);
1451 editorUi.executeLayout(function()
1459editorUi.menus.addMenuItem(menu, 'runLayout', parent, null, null, mxResources.get('apply') + '...'…
1464 if (!mxClient.IS_CHROMEAPP && editorUi.isOffline())
1486 this.editorUi.openLink('https://www.diagrams.net/search?src=' +
1494 this.editorUi.hideCurrentMenu();
1528 editorUi.actions.addAction('website...', function()
1530 editorUi.openLink('https://www.diagrams.net');
1533 editorUi.actions.addAction('check4Updates', function()
1535 editorUi.checkForUpdates();
1566 editorUi.actions.addAction('diagramLanguage...', function()
1591 editorUi.actions.addAction('createSidebarEntry', mxUtils.bind(this, function()
1599 editorUi.showTextDialog('Create Sidebar Entry', 'this.addDataEntry(\'tag1 tag2\', ' +
1605 editorUi.actions.addAction('showBoundingBox', mxUtils.bind(this, function()
1615 editorUi.actions.addAction('testCheckFile', mxUtils.bind(this, function()
1617 var xml = (editorUi.pages != null && editorUi.getCurrentFile() != null) ?
1618 editorUi.getCurrentFile().getAnonymizedXmlForPages(editorUi.pages) : '';
1620 var dlg = new TextareaDialog(editorUi, 'Paste Data:', xml,
1635 var pages = editorUi.getPagesForNode(doc.documentElement, 'mxGraphModel');
1641 var checksum = editorUi.getHashValueForPages(pages);
1766 editorUi.handleError(e);
1778 editorUi.showDialog(dlg.container, 620, 460, true, true);
1784 editorUi.actions.addAction('testDiff', mxUtils.bind(this, function()
1786 if (editorUi.pages != null)
1790 snapshot = editorUi.getPagesForNode(mxUtils.parseXml(
1791 editorUi.getFileData(true)).documentElement);
1797 dlg.textarea.value = JSON.stringify(editorUi.diffPages(
1798 snapshot, editorUi.pages), null, 2);
1802 editorUi.handleError(e);
1806 var dlg = new TextareaDialog(editorUi, 'Diff/Sync:', '',
1809 var file = editorUi.getCurrentFile();
1817 editorUi.hideDialog();
1821 editorUi.handleError(e);
1832 snapshot = editorUi.getPagesForNode(mxUtils.parseXml(
1833 editorUi.getFileData(true)).documentElement);
1838 dlg.textarea.value = JSON.stringify(editorUi.diffPages(
1839 snapshot, editorUi.pages), null, 2);
1842 editorUi.showDialog(dlg.container, 620, 460, true, true);
1847 editorUi.alert('No pages');
1851 editorUi.actions.addAction('testInspect', mxUtils.bind(this, function()
1853 console.log(editorUi, graph.getModel());
1856 editorUi.actions.addAction('testXmlImageExport', mxUtils.bind(this, function()
1911 editorUi.actions.addAction('testShowConsole', function()
1933 editorUi.actions.addAction('shapes...', function()
1935 if (mxClient.IS_CHROMEAPP || !editorUi.isOffline())
1937 editorUi.showDialog(new MoreShapesDialog(editorUi, true).container, 640, (isLocalStorage) ?
1942 editorUi.showDialog(new MoreShapesDialog(editorUi, false).container, 360, (isLocalStorage) ?
1947 editorUi.actions.put('createShape', new Action(mxResources.get('shape') + '...', function(evt)
1951 var cell = new mxCell('', new mxGeometry(0, 0, 120, 120), editorUi.defaultCustomShapeStyle);
1954 var dlg = new EditShapeDialog(editorUi, cell, mxResources.get('editShape') + ':', 630, 400);
1955 editorUi.showDialog(dlg.container, 640, 480, true, false);
1960 editorUi.actions.put('embedHtml', new Action(mxResources.get('html') + '...', function()
1962 if (editorUi.spinner.spin(document.body, mxResources.get('loading')))
1964 editorUi.getPublicUrl(editorUi.getCurrentFile(), function(url)
1966 editorUi.spinner.stop();
1968editorUi.showHtmlDialog(mxResources.get('create'), 'https://www.diagrams.net/doc/faq/embed-html-op…
1971 editorUi.createHtml(publicUrl, zoomEnabled, initialZoom, linkTarget, linkColor, fit, allPages,
1974 var dlg = new EmbedDialog(editorUi, html + '\n' + scriptTag, null, null, function()
2032 editorUi.handleError({message: mxResources.get('errorUpdatingPreview')});
2035 editorUi.showDialog(dlg.container, 450, 240, true, true);
2043 editorUi.actions.put('liveImage', new Action('Live image...', function()
2045 var current = editorUi.getCurrentFile();
2047 if (current != null && editorUi.spinner.spin(document.body, mxResources.get('loading')))
2049 editorUi.getPublicUrl(editorUi.getCurrentFile(), function(url)
2051 editorUi.spinner.stop();
2055 var dlg = new EmbedDialog(editorUi, '<img src="' + ((current.constructor != DriveFile) ?
2057 editorUi.showDialog(dlg.container, 450, 240, true, true);
2062 editorUi.handleError({message: mxResources.get('invalidPublicUrl')});
2068 editorUi.actions.put('embedImage', new Action(mxResources.get('image') + '...', function()
2070 editorUi.showEmbedImageDialog(function(fit, shadow, retina, lightbox, editLink, layers)
2072 if (editorUi.spinner.spin(document.body, mxResources.get('loading')))
2074 editorUi.createEmbedImage(fit, shadow, retina, lightbox, editLink, layers, function(result)
2076 editorUi.spinner.stop();
2077 var dlg = new EmbedDialog(editorUi, result);
2078 editorUi.showDialog(dlg.container, 450, 240, true, true);
2082 editorUi.spinner.stop();
2083 editorUi.handleError(err);
2086 }, mxResources.get('image'), mxResources.get('retina'), editorUi.isExportToCanvas());
2089 editorUi.actions.put('embedSvg', new Action(mxResources.get('formatSvg') + '...', function()
2091 editorUi.showEmbedImageDialog(function(fit, shadow, image, lightbox, editLink, layers)
2093 if (editorUi.spinner.spin(document.body, mxResources.get('loading')))
2095 editorUi.createEmbedSvg(fit, shadow, image, lightbox, editLink, layers, function(result)
2097 editorUi.spinner.stop();
2099 var dlg = new EmbedDialog(editorUi, result);
2100 editorUi.showDialog(dlg.container, 450, 240, true, true);
2104 editorUi.spinner.stop();
2105 editorUi.handleError(err);
2112 editorUi.actions.put('embedIframe', new Action(mxResources.get('iframe') + '...', function()
2116 editorUi.showPublishLinkDialog(mxResources.get('iframe'), null, '100%',
2120 if (editorUi.spinner.spin(document.body, mxResources.get('loading')))
2122 editorUi.getPublicUrl(editorUi.getCurrentFile(), function(url)
2124 editorUi.spinner.stop();
2132 var dlg = new EmbedDialog(editorUi, '<iframe frameborder="0" style="width:' + width +
2133 ';height:' + height + ';" src="' + editorUi.createLink(linkTarget, linkColor,
2135 editorUi.showDialog(dlg.container, 450, 240, true, true);
2142 editorUi.actions.put('embedNotion', new Action(mxResources.get('notion') + '...', function()
2144 editorUi.showPublishLinkDialog(mxResources.get('notion'), null, null, null,
2147 if (editorUi.spinner.spin(document.body, mxResources.get('loading')))
2149 editorUi.getPublicUrl(editorUi.getCurrentFile(), function(url)
2151 editorUi.spinner.stop();
2159 var dlg = new EmbedDialog(editorUi, editorUi.createLink(linkTarget, linkColor,
2161 editorUi.showDialog(dlg.container, 450, 240, true, true);
2168 editorUi.actions.put('publishLink', new Action(mxResources.get('link') + '...', function()
2170 editorUi.showPublishLinkDialog(null, null, null, null,
2173 if (editorUi.spinner.spin(document.body, mxResources.get('loading')))
2175 editorUi.getPublicUrl(editorUi.getCurrentFile(), function(url)
2177 editorUi.spinner.stop();
2186 var dlg = new EmbedDialog(editorUi, editorUi.createLink(linkTarget, linkColor,
2188 editorUi.showDialog(dlg.container, 450, 240, true, true);
2195 editorUi.actions.addAction('microsoftOffice...', function()
2197 editorUi.openLink('https://office.draw.io');
2200 editorUi.actions.addAction('googleDocs...', function()
2202 editorUi.openLink('http://docsaddon.draw.io');
2205 editorUi.actions.addAction('googleSlides...', function()
2207 editorUi.openLink('https://slidesaddon.draw.io');
2210 editorUi.actions.addAction('googleSheets...', function()
2212 editorUi.openLink('https://sheetsaddon.draw.io');
2215 editorUi.actions.addAction('googleSites...', function()
2217 if (editorUi.spinner.spin(document.body, mxResources.get('loading')))
2219 editorUi.getPublicUrl(editorUi.getCurrentFile(), function(url)
2221 editorUi.spinner.stop();
2222 var dlg = new GoogleSitesDialog(editorUi, url);
2223 editorUi.showDialog(dlg.container, 420, 256, true, true);
2232 var action = editorUi.actions.addAction('scratchpad', function()
2234 editorUi.toggleScratchpad();
2240 return editorUi.scratchpad != null;
2245 editorUi.actions.addAction('plugins...', function()
2247 editorUi.showDialog(new PluginsDialog(editorUi).container, 360, 170, true, false);
2252 var action = editorUi.actions.addAction('search', function()
2254 var visible = editorUi.sidebar.isEntryVisible('search');
2255 editorUi.sidebar.showPalette('search', !visible);
2266 action.setSelectedCallback(function() { return editorUi.sidebar.isEntryVisible('search'); });
2270 editorUi.actions.get('save').funct = function(exit)
2277 … var data = (urlParams['pages'] != '0' || (editorUi.pages != null && editorUi.pages.length > 1)) ?
2278 editorUi.getFileData(true) : mxUtils.getXml(editorUi.editor.getGraphXml());
2282 var msg = editorUi.createLoadMessage('save');
2298 editorUi.editor.modified = false;
2299 editorUi.editor.setStatus('');
2303 var file = editorUi.getCurrentFile();
2307 editorUi.saveFile();
2311 var saveAndExitAction = editorUi.actions.addAction('saveAndExit', function()
2313 editorUi.actions.get('save').funct(true);
2318 editorUi.actions.addAction('exit', function()
2322 editorUi.sendEmbeddedSvgExport();
2328 editorUi.editor.modified = false;
2330 modified: editorUi.editor.modified}) : '';
2335 if (!editorUi.editor.modified)
2341 editorUi.confirm(mxResources.get('allChangesLost'), null, fn,
2350 if (editorUi.isExportToCanvas())
2354 if (editorUi.jpgSupported)
2361 else if (!editorUi.isOffline() && (!mxClient.IS_IOS || !navigator.standalone))
2369 if (editorUi.isOffline() || editorUi.printPdfExport)
2374 else if (!editorUi.isOffline() && (!mxClient.IS_IOS || !navigator.standalone))
2379 if (!mxClient.IS_IE && (typeof(VsdxExport) !== 'undefined' || !editorUi.isOffline()))
2386 if (!editorUi.isOffline())
2405 editorUi.loadImage(data, mxUtils.bind(this, function(img)
2411 editorUi.resizeImage(img, data, mxUtils.bind(this, function(data2, w2, h2)
2413 …var s = (resizeImages) ? Math.min(1, Math.min(editorUi.maxImageSize / w2, editorUi.maxImageSize / …
2415editorUi.importFile(data, mime, x, y, Math.round(w2 * s), Math.round(h2 * s), filename, function(c…
2417 editorUi.spinner.stop();
2424 if (data.length > editorUi.resampleThreshold)
2426 editorUi.confirmImageResize(function(doResize)
2438 editorUi.handleError({message: mxResources.get('cannotOpenFile')});
2443 editorUi.importFile(data, mime, x, y, 0, 0, filename, function(cells)
2445 editorUi.spinner.stop();
2481 if (editorUi.spinner.spin(document.body, mxResources.get('loading')))
2491 if (/\.svg$/i.test(file.getTitle()) && !editorUi.editor.isDataSvg(file.getData()))
2501 editorUi.handleError(resp, (resp != null) ? mxResources.get('errorLoadingFile') : null);
2502 }, service == editorUi.drive);
2509 if (editorUi.drive != null)
2514 pickFileFromService(editorUi.drive);
2526 if (editorUi.oneDrive != null)
2530 pickFileFromService(editorUi.oneDrive);
2541 if (editorUi.dropbox != null)
2545 pickFileFromService(editorUi.dropbox);
2558 if (editorUi.gitHub != null)
2562 pickFileFromService(editorUi.gitHub);
2566 if (editorUi.gitLab != null)
2570 pickFileFromService(editorUi.gitLab);
2574 if (editorUi.notion != null)
2579 pickFileFromService(editorUi.notion);
2583 if (editorUi.trello != null)
2587 pickFileFromService(editorUi.trello);
2604 editorUi.importLocalFile(false);
2612 editorUi.importLocalFile(true);
2616 if (!editorUi.isOffline())
2622 var dlg = new FilenameDialog(editorUi, '', mxResources.get('import'), function(fileUrl)
2624 …if (fileUrl != null && fileUrl.length > 0 && editorUi.spinner.spin(document.body, mxResources.get(…
2629 editorUi.editor.loadUrl(PROXY_URL + '?url=' + encodeURIComponent(fileUrl), function(data)
2635 editorUi.spinner.stop();
2636 editorUi.handleError(null, mxResources.get('errorLoadingFile'));
2640 editorUi.showDialog(dlg.container, 300, 80, true, true);
2653 editorUi.alert(mxResources.get('restartForChangeRequired'));
2668 editorUi.alert(mxResources.get('restartForChangeRequired'));
2679 editorUi.alert(mxResources.get('restartForChangeRequired'));
2690 editorUi.alert(mxResources.get('restartForChangeRequired'));
2703 editorUi.alert(mxResources.get('restartForChangeRequired'));
2717 editorUi.alert(mxResources.get('restartForChangeRequired'));
2726 var renameAction = this.editorUi.actions.addAction('rename...', mxUtils.bind(this, function()
2728 var file = this.editorUi.getCurrentFile();
2734 editorUi.showSaveFilePicker(mxUtils.bind(editorUi, function(fileHandle, desc)
2740 editorUi.save(desc.name);
2741 }), null, editorUi.createFileSystemOptions(file.getTitle()));
2745 var filename = (file.getTitle() != null) ? file.getTitle() : this.editorUi.defaultFilename;
2747 …var dlg = new FilenameDialog(this.editorUi, filename, mxResources.get('rename'), mxUtils.bind(this…
2750 this.editorUi.spinner.spin(document.body, mxResources.get('renaming')))
2755 this.editorUi.spinner.stop();
2759 … this.editorUi.handleError(resp, (resp != null) ? mxResources.get('errorRenamingFile') : null);
2770editorUi.showError(mxResources.get('error'), mxResources.get('invalidName'), mxResources.get('ok')…
2773 }, null, null, null, null, editorUi.editor.fileExtensions);
2774 this.editorUi.showDialog(dlg.container, 340, 96, true, true);
2787 editorUi.actions.addAction('makeCopy...', mxUtils.bind(this, function()
2789 var file = editorUi.getCurrentFile();
2793 var title = editorUi.getCopyFilename(file);
2797 var dlg = new CreateDialog(editorUi, title, mxUtils.bind(this, function(newTitle, mode)
2801 editorUi.editor.editAsNew(editorUi.getFileData(), newTitle);
2815 if (editorUi.spinner.spin(document.body, mxResources.get('saving')))
2826 editorUi.spinner.stop();
2831 editorUi.handleError(resp);
2835 editorUi.handleError(resp);
2841 editorUi.createFile(newTitle, editorUi.getFileData(true), null, mode);
2847 editorUi.hideDialog();
2850 editorUi.editor.fileExtensions);
2851 editorUi.showDialog(dlg.container, 420, 380, true, true);
2857 editorUi.editor.editAsNew(this.editorUi.getFileData(true), title);
2862 editorUi.actions.addAction('moveToFolder...', mxUtils.bind(this, function()
2864 var file = editorUi.getCurrentFile();
2882 editorUi.pickFolder(file.getMode(), mxUtils.bind(this, function(folderId)
2884 if (editorUi.spinner.spin(document.body, mxResources.get('moving')))
2888 editorUi.spinner.stop();
2891 editorUi.handleError(resp);
2903 editorUi.actions.put('useOffline', new Action(mxResources.get('useOffline') + '...', function()
2905 editorUi.openLink('https://app.draw.io/')
2908editorUi.actions.put('downloadDesktop', new Action(mxResources.get('downloadDesktop') + '...', fun…
2910 editorUi.openLink('https://get.draw.io/')
2913 this.editorUi.actions.addAction('share...', mxUtils.bind(this, function()
2917 var file = editorUi.getCurrentFile();
2926 editorUi.handleError(e);
2932 var file = editorUi.getCurrentFile();
2942 if (!navigator.standalone && !editorUi.isOffline())
2947 if (urlParams['embed'] != '1' && !editorUi.isOffline())
2953 editorUi.addInsertItem = function(menu, parent, title, method) method
2955 if (method != 'plantUml' || (EditorUi.enablePlantUml && !editorUi.isOffline()))
2962 var dlg = new ParseDialog(editorUi, title, method);
2963 editorUi.showDialog(dlg.container, 620, 420, true, false);
2964 editorUi.dialog.container.style.overflow = 'auto';
2969 var dlg = new CreateGraphDialog(editorUi, title, method);
2970 editorUi.showDialog(dlg.container, 620, 420, true, false);
3010 if (editorUi.hoverIcons != null)
3012 editorUi.hoverIcons.update(graph.view.getState(cell));
3019 editorUi.actions.put('insertText', new Action(mxResources.get('text'), function()
3028 editorUi.actions.put('insertRectangle', new Action(mxResources.get('rectangle'), function()
3036 editorUi.actions.put('insertEllipse', new Action(mxResources.get('ellipse'), function()
3044 editorUi.actions.put('insertRhombus', new Action(mxResources.get('rhombus'), function()
3052 editorUi.addInsertMenuItems = mxUtils.bind(this, function(menu, parent, methods)
3062 editorUi.addInsertItem(menu, parent, mxResources.get(methods[i]) + '...', methods[i]);
3073 if (editorUi.insertTemplateEnabled && !editorUi.isOffline())
3085editorUi.addInsertMenuItems(menu, parent, ['horizontalFlow', 'verticalFlow', '-', 'horizontalTree',
3091 editorUi.addInsertMenuItems(menu, parent, ['fromText', 'plantUml', 'mermaid', '-', 'formatSql']);
3095 editorUi.showImportCsvDialog();
3101 var recent = editorUi.getRecent();
3123 editorUi.loadFile(entry.id);
3133 editorUi.resetRecent();
3139 if (editorUi.drive != null)
3143 editorUi.pickFile(App.MODE_GOOGLE);
3154 if (editorUi.oneDrive != null)
3158 editorUi.pickFile(App.MODE_ONEDRIVE);
3169 if (editorUi.dropbox != null)
3173 editorUi.pickFile(App.MODE_DROPBOX);
3186 if (editorUi.gitHub != null)
3190 editorUi.pickFile(App.MODE_GITHUB);
3194 if (editorUi.gitLab != null)
3198 editorUi.pickFile(App.MODE_GITLAB);
3202 if (editorUi.notion != null)
3207 editorUi.pickFile(App.MODE_NOTION);
3211 if (editorUi.trello != null)
3215 editorUi.pickFile(App.MODE_TRELLO);
3232 editorUi.pickFile(App.MODE_BROWSER);
3241 editorUi.pickFile(App.MODE_DEVICE);
3245 if (!editorUi.isOffline())
3251 var dlg = new FilenameDialog(editorUi, '', mxResources.get('open'), function(fileUrl)
3255 if (editorUi.getCurrentFile() == null)
3267 editorUi.showDialog(dlg.container, 300, 80, true, true);
3279 if (editorUi.drive != null)
3283 editorUi.showLibraryDialog(null, null, null, null, App.MODE_GOOGLE);
3295 if (editorUi.oneDrive != null)
3299 editorUi.showLibraryDialog(null, null, null, null, App.MODE_ONEDRIVE);
3310 if (editorUi.dropbox != null)
3314 editorUi.showLibraryDialog(null, null, null, null, App.MODE_DROPBOX);
3327 if (editorUi.gitHub != null)
3331 editorUi.showLibraryDialog(null, null, null, null, App.MODE_GITHUB);
3335 if (editorUi.gitLab != null)
3339 editorUi.showLibraryDialog(null, null, null, null, App.MODE_GITLAB);
3343 if (editorUi.notion != null)
3348 editorUi.showLibraryDialog(null, null, null, null, App.MODE_NOTION);
3352 if (editorUi.trello != null)
3356 editorUi.showLibraryDialog(null, null, null, null, App.MODE_TRELLO);
3373 editorUi.showLibraryDialog(null, null, null, null, App.MODE_BROWSER);
3382 editorUi.showLibraryDialog(null, null, null, null, App.MODE_DEVICE);
3391 if (editorUi.drive != null)
3395 editorUi.pickLibrary(App.MODE_GOOGLE);
3407 if (editorUi.oneDrive != null)
3411 editorUi.pickLibrary(App.MODE_ONEDRIVE);
3422 if (editorUi.dropbox != null)
3426 editorUi.pickLibrary(App.MODE_DROPBOX);
3439 if (editorUi.gitHub != null)
3443 editorUi.pickLibrary(App.MODE_GITHUB);
3447 if (editorUi.gitLab != null)
3451 editorUi.pickLibrary(App.MODE_GITLAB);
3455 if (editorUi.notion != null)
3460 editorUi.pickLibrary(App.MODE_NOTION);
3464 if (editorUi.trello != null)
3468 editorUi.pickLibrary(App.MODE_TRELLO);
3485 editorUi.pickLibrary(App.MODE_BROWSER);
3494 editorUi.pickLibrary(App.MODE_DEVICE);
3498 if (!editorUi.isOffline())
3504 var dlg = new FilenameDialog(editorUi, '', mxResources.get('open'), function(fileUrl)
3506 …if (fileUrl != null && fileUrl.length > 0 && editorUi.spinner.spin(document.body, mxResources.get(…
3510 if (!editorUi.editor.isCorsEnabledForUrl(fileUrl))
3520 editorUi.spinner.stop();
3524 editorUi.loadLibrary(new UrlLibrary(this, req.getText(), fileUrl));
3528 editorUi.handleError(e, mxResources.get('errorLoadingFile'));
3533 editorUi.spinner.stop();
3534 editorUi.handleError(null, mxResources.get('errorLoadingFile'));
3538 editorUi.spinner.stop();
3539 editorUi.handleError(null, mxResources.get('errorLoadingFile'));
3543 editorUi.showDialog(dlg.container, 300, 80, true, true);
3554 editorUi.showRemotelyStoredLibrary(mxResources.get('libraries'));
3569 var action = editorUi.actions.addAction('comments', mxUtils.bind(this, function()
3574 …this.commentsWindow = new CommentsWindow(editorUi, document.body.offsetWidth - 380, 120, 300, 350);
3578 editorUi.fireEvent(new mxEventObject('comments'));
3582 editorUi.fireEvent(new mxEventObject('comments'));
3585 editorUi.fireEvent(new mxEventObject('comments'));
3604 editorUi.editor.addListener('fileLoaded', mxUtils.bind(this, function()
3621 editorUi.menus.addMenuItems(menu, ['tags'], parent);
3623 if (editorUi.commentsSupported())
3625 editorUi.menus.addMenuItems(menu, ['comments'], parent);
3632 this.addMenuItems(menu, ((this.editorUi.format != null) ? ['formatPanel'] : []).
3633 concat(['outline', 'layers', 'tags']).concat((editorUi.commentsSupported()) ?
3642 if (!editorUi.isOffline() || mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
3685 if (!editorUi.isOffline() || mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
3705 if (!editorUi.isOfflineApp() && isLocalStorage)
3724 editorUi.actions.addAction('templates', function()
3732 var tempDlg = new TemplatesDialog(editorUi, function(xml){console.log(arguments)}, null,
3738 editorUi.drive.listFiles(null, oneWeek, username? true : false, function(resp)
3751 editorUi.drive.listFiles(str, null, username? true : false, function(resp)
3764 editorUi.drive.getFile(obj.id, function(file)
3773editorUi.showDialog(tempDlg.container, window.innerWidth, window.innerHeight, true, false, null, f…
3794 if (editorUi.isRevisionHistorySupported())
3828 var file = this.editorUi.getCurrentFile();
3841 if (!editorUi.isOffline() || mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
3873 if (!editorUi.isOffline() || mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
3882 editorUi.getServiceName() == 'draw.io' &&
3883 !editorUi.isOfflineApp() && file != null)
3890 if (editorUi.isOfflineApp())
3918 if (editorUi.isRevisionHistorySupported())
3923 if (file != null && editorUi.fileNode != null && urlParams['embedInline'] != '1')
3926 file.getTitle() : editorUi.defaultFilename;
3997 var graph = editorUi.editor.graph;
4017 editorUi.fireEvent(new mxEventObject('styleChanged',
4063 editorUi.fireEvent(new mxEventObject('customFontsChanged'));
4071 var extFonts = mxUtils.clone(this.editorUi.editor.graph.extFonts);
4096 var change = new ChangeExtFonts(this.editorUi, extFonts, customFonts);
4097 this.editorUi.editor.graph.model.execute(change);
4100 this.editorUi.hideCurrentMenu();
4212 editorUi.fireEvent(new mxEventObject('customFontsChanged'));
4220 var extFonts = this.editorUi.editor.graph.extFonts;
4243 … this.editorUi.fireEvent(new mxEventObject('customFontsChanged', 'customFonts', this.customFonts));
4255 this.editorUi.editor.graph.addExtFont(name, url, true);
4262 var change = new ChangeExtFonts(this.editorUi, [], []);
4263 editorUi.editor.graph.model.execute(change);
4272 var graph = this.editorUi.editor.graph;
4340 var extFonts = this.editorUi.editor.graph.extFonts;
4371 …var dlg = new FontDialog(this.editorUi, curFontName, curUrl, curType, mxUtils.bind(this, function(…
4414 this.editorUi.editor.graph.addExtFont(fontName, fontUrl);
4432 … this.editorUi.fireEvent(new mxEventObject('customFontsChanged', 'customFonts', this.customFonts));
4442 this.editorUi.showDialog(dlg.container, 380, Editor.enableWebFonts ? 250 : 180, true, true);