removed support for IE quirks mode

development
mcyph 2021-03-20 15:32:46 +11:00
parent 62f0f61eda
commit ea47e07a1e
41 changed files with 141 additions and 1864 deletions

View File

@ -85,12 +85,6 @@
var bw = 16;
var bh = 16;
if (mxClient.IS_QUIRKS)
{
bw -= 1;
bh -= 1;
}
function addButton(label, funct)
{
var btn = document.createElement('div');

View File

@ -64,14 +64,6 @@
document.body.appendChild(container);
// Workaround for Internet Explorer ignoring certain styles
if (mxClient.IS_QUIRKS)
{
document.body.style.overflow = 'hidden';
new mxDivResizer(tbContainer);
new mxDivResizer(container);
}
// Creates the model and the graph inside the container
// using the fastest rendering available on the browser
var model = new mxGraphModel();

View File

@ -51,13 +51,6 @@
// Disables built-in context menu
mxEvent.disableContextMenu(container);
// Workaround for Internet Explorer ignoring certain styles
if (mxClient.IS_QUIRKS)
{
document.body.style.overflow = 'hidden';
new mxDivResizer(container);
}
document.body.appendChild(container);
// Creates the graph inside the DOM node.

View File

@ -118,12 +118,6 @@
mxUtils.alert('Show properties for cell '+(cell.customId || cell.getId()));
}
};
if (mxClient.IS_QUIRKS)
{
document.body.style.overflow = 'hidden';
new mxDivResizer(container);
}
}
};

View File

@ -1728,7 +1728,7 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn)
{
linkInput.focus();
if (mxClient.IS_GC || mxClient.IS_FF || document.documentMode >= 5 || mxClient.IS_QUIRKS)
if (mxClient.IS_GC || mxClient.IS_FF)
{
linkInput.select();
}
@ -2011,19 +2011,9 @@ var LayersWindow = function(editorUi, x, y, w, h)
ldiv.style.display = 'block';
ldiv.style.whiteSpace = 'nowrap';
if (mxClient.IS_QUIRKS)
{
ldiv.style.filter = 'none';
}
var link = document.createElement('a');
link.className = 'geButton';
if (mxClient.IS_QUIRKS)
{
link.style.filter = 'none';
}
var removeLink = link.cloneNode();
removeLink.innerHTML = '<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';

View File

@ -800,12 +800,7 @@ function Dialog(editorUi, elt, w, h, modal, closable, onClose, noScroll, transpa
var dh = ds.height;
var left = Math.max(1, Math.round((ds.width - w - 64) / 2));
var top = Math.max(1, Math.round((dh - h - editorUi.footerHeight) / 3));
// Keeps window size inside available space
if (!mxClient.IS_QUIRKS)
{
elt.style.maxHeight = '100%';
}
w = (document.body != null) ? Math.min(w, document.body.scrollWidth - 64) : w;
h = Math.min(h, dh - 64);
@ -826,11 +821,6 @@ function Dialog(editorUi, elt, w, h, modal, closable, onClose, noScroll, transpa
this.bg.style.zIndex = this.zIndex - 2;
mxUtils.setOpacity(this.bg, this.bgOpacity);
if (mxClient.IS_QUIRKS)
{
new mxDivResizer(this.bg);
}
}
var origin = mxUtils.getDocumentScrollOrigin(document);
@ -2001,7 +1991,7 @@ var FilenameDialog = function(editorUi, filename, buttonText, fn, label, validat
nameInput.focus();
if (mxClient.IS_GC || mxClient.IS_FF || document.documentMode >= 5 || mxClient.IS_QUIRKS)
if (mxClient.IS_GC || mxClient.IS_FF)
{
nameInput.select();
}
@ -2320,7 +2310,7 @@ FilenameDialog.createFileTypes = function(editorUi, nameInput, types)
// Shadow filter causes problems in outline window in quirks mode. IE8 standards
// also has known rendering issues inside mxWindow but not using shadow is worse.
this.backgroundPageShape.isShadow = !mxClient.IS_QUIRKS;
this.backgroundPageShape.isShadow = true;
this.backgroundPageShape.dialect = mxConstants.DIALECT_STRICTHTML;
this.backgroundPageShape.init(graph.container);

View File

@ -1788,7 +1788,7 @@ EditorUi.prototype.initCanvas = function()
var st = graph.container.scrollTop;
var sl = graph.container.scrollLeft;
var sb = (mxClient.IS_QUIRKS || document.documentMode >= 8) ? 20 : 14;
var sb = 14;
if (document.documentMode == 8 || document.documentMode == 9)
{
@ -3615,7 +3615,7 @@ EditorUi.prototype.refresh = function(sizeDidChange)
tmp += this.toolbarHeight;
}
if (tmp > 0 && !mxClient.IS_QUIRKS)
if (tmp > 0)
{
tmp += 1;
}

View File

@ -385,8 +385,8 @@ Format.prototype.refresh = function()
label.style.fontSize = '13px';
label.style.borderWidth = '0px 0px 1px 1px';
label.style.borderStyle = 'solid';
label.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
label.style.height = (mxClient.IS_QUIRKS) ? '34px' : '25px';
label.style.display = 'inline-block';
label.style.height = '25px';
label.style.overflow = 'hidden';
label.style.width = '100%';
this.container.appendChild(div);
@ -805,11 +805,7 @@ BaseFormatPanel.prototype.createStepper = function(input, update, step, height,
step = (step != null) ? step : 1;
height = (height != null) ? height : 8;
if (mxClient.IS_QUIRKS)
{
height = height - 2;
}
else if (mxClient.IS_MT || document.documentMode >= 8)
if (mxClient.IS_MT || document.documentMode >= 8)
{
height = height + 1;
}
@ -887,12 +883,6 @@ BaseFormatPanel.prototype.createStepper = function(input, update, step, height,
mxEvent.addGestureListeners(stepper,
function(evt)
{
// Workaround for lost current selection in page because of focus in IE
if (mxClient.IS_QUIRKS || document.documentMode == 8)
{
currentSelection = document.selection.createRange();
}
mxEvent.consume(evt);
},
null,
@ -930,7 +920,7 @@ BaseFormatPanel.prototype.createOption = function(label, isCheckedFn, setChecked
div.style.whiteSpace = 'nowrap';
div.style.overflow = 'hidden';
div.style.width = '200px';
div.style.height = (mxClient.IS_QUIRKS) ? '27px' : '18px';
div.style.height = '18px';
var cb = document.createElement('input');
cb.setAttribute('type', 'checkbox');
@ -1099,7 +1089,7 @@ BaseFormatPanel.prototype.createColorOption = function(label, getColorFn, setCol
div.style.whiteSpace = 'nowrap';
div.style.overflow = 'hidden';
div.style.width = '200px';
div.style.height = (mxClient.IS_QUIRKS) ? '27px' : '18px';
div.style.height = '18px';
var cb = document.createElement('input');
cb.setAttribute('type', 'checkbox');
@ -1124,17 +1114,11 @@ BaseFormatPanel.prototype.createColorOption = function(label, getColorFn, setCol
{
applying = true;
color = (/(^#?[a-zA-Z0-9]*$)/.test(color)) ? color : defaultColor;
btn.innerHTML = '<div style="width:' + ((mxClient.IS_QUIRKS) ? '30' : '36') +
btn.innerHTML = '<div style="width:36' +
'px;height:12px;margin:3px;border:1px solid black;background-color:' +
mxUtils.htmlEntities((color != null && color != mxConstants.NONE) ?
color : defaultColor) + ';"></div>';
// Fine-tuning in Firefox, quirks mode and IE8 standards
if (mxClient.IS_QUIRKS || document.documentMode == 8)
{
btn.firstChild.style.margin = '0px';
}
if (color != null && color != mxConstants.NONE)
{
cb.setAttribute('checked', 'checked');
@ -1181,7 +1165,7 @@ BaseFormatPanel.prototype.createColorOption = function(label, getColorFn, setCol
btn.style.position = 'absolute';
btn.style.marginTop = '-4px';
btn.style.right = (mxClient.IS_QUIRKS) ? '0px' : '20px';
btn.style.right = '20px';
btn.style.height = '22px';
btn.className = 'geColorBtn';
btn.style.display = (cb.checked || hideCheckbox) ? '' : 'none';
@ -1293,7 +1277,7 @@ BaseFormatPanel.prototype.addArrow = function(elt, height)
height = (height != null) ? height : 10;
var arrow = document.createElement('div');
arrow.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
arrow.style.display = 'inline-block';
arrow.style.padding = '6px';
arrow.style.paddingRight = '4px';
@ -1325,7 +1309,7 @@ BaseFormatPanel.prototype.addArrow = function(elt, height)
symbol.style.paddingRight = '6px';
symbol.style.marginLeft = '4px';
symbol.style.marginTop = '-1px';
symbol.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
symbol.style.display = 'inline-block';
mxUtils.setOpacity(symbol, 60);
}
@ -1912,11 +1896,6 @@ ArrangePanel.prototype.addAlign = function(div)
stylePanel.style.borderWidth = '0px';
stylePanel.className = 'geToolbarContainer';
if (mxClient.IS_QUIRKS)
{
div.style.height = '60px';
}
var left = this.editorUi.toolbar.addButton('geSprite-alignleft', mxResources.get('left'),
function() { graph.alignCells(mxConstants.ALIGN_LEFT); }, stylePanel);
var center = this.editorUi.toolbar.addButton('geSprite-aligncenter', mxResources.get('center'),
@ -2779,11 +2758,6 @@ TextFormatPanel.prototype.addFont = function(container)
stylePanel.style.borderWidth = '0px';
stylePanel.className = 'geToolbarContainer';
if (mxClient.IS_QUIRKS)
{
stylePanel.style.display = 'block';
}
if (graph.cellEditor.isContentEditing())
{
var cssPanel = stylePanel.cloneNode();
@ -2831,11 +2805,6 @@ TextFormatPanel.prototype.addFont = function(container)
var verticalItem = this.editorUi.toolbar.addItems(['vertical'], stylePanel2, true)[0];
if (mxClient.IS_QUIRKS)
{
mxUtils.br(container);
}
container.appendChild(stylePanel2);
this.styleButtons(fontStyleItems);
@ -2902,11 +2871,6 @@ TextFormatPanel.prototype.addFont = function(container)
this.styleButtons([top, middle, bottom]);
if (mxClient.IS_QUIRKS)
{
mxUtils.br(container);
}
container.appendChild(stylePanel3);
// Hack for updating UI state below based on current text selection
@ -2980,12 +2944,6 @@ TextFormatPanel.prototype.addFont = function(container)
this.styleButtons(btns);
btns[btns.length - 2].style.marginLeft = '9px';
if (mxClient.IS_QUIRKS)
{
mxUtils.br(container);
tmp.style.height = '40';
}
container.appendChild(tmp);
}
else
@ -3109,15 +3067,10 @@ TextFormatPanel.prototype.addFont = function(container)
var input = document.createElement('input');
input.style.textAlign = 'right';
input.style.marginTop = '4px';
if (!mxClient.IS_QUIRKS)
{
input.style.position = 'absolute';
input.style.right = '32px';
}
input.style.width = '40px';
input.style.height = (mxClient.IS_QUIRKS) ? '21px' : '17px';
input.style.height = '17px';
stylePanel2.appendChild(input);
// Workaround for font size 4 if no text is selected is update font size below
@ -3258,11 +3211,7 @@ TextFormatPanel.prototype.addFont = function(container)
var stepper = this.createStepper(input, inputUpdate, 1, 10, true, Menus.prototype.defaultFontSize);
stepper.style.display = input.style.display;
stepper.style.marginTop = '4px';
if (!mxClient.IS_QUIRKS)
{
stepper.style.right = '20px';
}
stylePanel2.appendChild(stepper);
@ -3574,11 +3523,6 @@ TextFormatPanel.prototype.addFont = function(container)
wrapper2.appendChild(insertPanel);
container.appendChild(wrapper2);
if (mxClient.IS_QUIRKS)
{
wrapper2.style.height = '70';
}
var tablePanel = stylePanel.cloneNode(false);
tablePanel.style.paddingLeft = '0px';
@ -3682,12 +3626,6 @@ TextFormatPanel.prototype.addFont = function(container)
wrapper3.appendChild(this.createTitle(mxResources.get('table')));
wrapper3.appendChild(tablePanel);
if (mxClient.IS_QUIRKS)
{
mxUtils.br(container);
wrapper3.style.height = '70';
}
var tablePanel2 = stylePanel.cloneNode(false);
tablePanel2.style.paddingLeft = '0px';
@ -3807,12 +3745,6 @@ TextFormatPanel.prototype.addFont = function(container)
this.styleButtons(btns);
btns[2].style.marginRight = '9px';
if (mxClient.IS_QUIRKS)
{
mxUtils.br(wrapper3);
mxUtils.br(wrapper3);
}
wrapper3.appendChild(tablePanel2);
container.appendChild(wrapper3);
@ -4473,7 +4405,7 @@ StyleFormatPanel.prototype.addFill = function(container)
var gradientSelect = document.createElement('select');
gradientSelect.style.position = 'absolute';
gradientSelect.style.marginTop = '-2px';
gradientSelect.style.right = (mxClient.IS_QUIRKS) ? '52px' : '72px';
gradientSelect.style.right = '72px';
gradientSelect.style.width = '70px';
var fillStyleSelect = gradientSelect.cloneNode(false);
@ -4822,8 +4754,6 @@ StyleFormatPanel.prototype.addStroke = function(container)
altStepper.style.marginTop = '2px';
altStylePanel.appendChild(altStepper);
if (!mxClient.IS_QUIRKS)
{
input.style.position = 'absolute';
input.style.height = '15px';
input.style.left = '141px';
@ -4833,12 +4763,6 @@ StyleFormatPanel.prototype.addStroke = function(container)
altInput.style.left = '141px';
altInput.style.height = '15px';
altStepper.style.left = '190px';
}
else
{
input.style.height = '17px';
altInput.style.height = '17px';
}
mxEvent.addListener(input, 'blur', update);
mxEvent.addListener(input, 'change', update);
@ -4846,12 +4770,6 @@ StyleFormatPanel.prototype.addStroke = function(container)
mxEvent.addListener(altInput, 'blur', altUpdate);
mxEvent.addListener(altInput, 'change', altUpdate);
if (mxClient.IS_QUIRKS)
{
mxUtils.br(stylePanel2);
mxUtils.br(stylePanel2);
}
var edgeStyle = this.editorUi.toolbar.addMenuFunctionInContainer(stylePanel2, 'geSprite-orthogonal', mxResources.get('waypoints'), false, mxUtils.bind(this, function(menu)
{
if (ss.style.shape != 'arrow')
@ -5089,22 +5007,10 @@ StyleFormatPanel.prototype.addStroke = function(container)
if (ss.edges.length == graph.getSelectionCount())
{
container.appendChild(stylePanel2);
if (mxClient.IS_QUIRKS)
{
mxUtils.br(container);
mxUtils.br(container);
}
container.appendChild(arrowPanel);
}
else if (ss.vertices.length == graph.getSelectionCount())
{
if (mxClient.IS_QUIRKS)
{
mxUtils.br(container);
}
container.appendChild(perimeterPanel);
}
@ -5454,11 +5360,6 @@ StyleFormatPanel.prototype.addEffects = function(div)
var table = document.createElement('table');
if (mxClient.IS_QUIRKS)
{
table.style.fontSize = '1em';
}
table.style.width = '100%';
table.style.fontWeight = 'bold';
table.style.paddingRight = '20px';
@ -5593,12 +5494,6 @@ DiagramStylePanel.prototype.addView = function(div)
div.style.paddingTop = '8px';
var table = document.createElement('table');
if (mxClient.IS_QUIRKS)
{
table.style.fontSize = '1em';
}
table.style.width = '100%';
table.style.fontWeight = 'bold';
@ -6261,7 +6156,7 @@ DiagramFormatPanel.prototype.addView = function(div)
btn.style.marginTop = '-4px';
btn.style.paddingBottom = (document.documentMode == 11 || mxClient.IS_MT) ? '0px' : '2px';
btn.style.height = '22px';
btn.style.right = (mxClient.IS_QUIRKS) ? '52px' : '72px';
btn.style.right = '72px';
btn.style.width = '56px';
bg.appendChild(btn);

View File

@ -9734,8 +9734,6 @@ if (typeof mxVertexHandler != 'undefined')
// Handles paste from Word, Excel etc by removing styles, classnames and unused nodes
// LATER: Fix undo/redo for paste
if (!mxClient.IS_QUIRKS && document.documentMode !== 7 && document.documentMode !== 8)
{
mxEvent.addListener(this.textarea, 'paste', mxUtils.bind(this, function(evt)
{
var clone = reference(this.textarea, this.textarea.cloneNode(true));
@ -9757,7 +9755,6 @@ if (typeof mxVertexHandler != 'undefined')
}
}), 0);
}));
}
};
mxCellEditor.prototype.toggleViewMode = function()
@ -9783,10 +9780,7 @@ if (typeof mxVertexHandler != 'undefined')
var content = mxUtils.htmlEntities(this.textarea.innerHTML);
// Workaround for trailing line breaks being ignored in the editor
if (!mxClient.IS_QUIRKS && document.documentMode != 8)
{
content = mxUtils.replaceTrailingNewlines(content, '<div><br></div>');
}
content = this.graph.sanitizeHtml((nl2Br) ? content.replace(/\n/g, '').replace(/&lt;br\s*.?&gt;/g, '<br>') : content, true);
this.textarea.className = 'mxCellEditor mxPlainTextEditor';

View File

@ -660,11 +660,6 @@ Menus.prototype.addInsertTableItem = function(menu, insertFn, parent)
table2.style.borderCollapse = 'collapse';
table2.style.borderStyle = 'solid';
if (!mxClient.IS_QUIRKS)
{
table2.setAttribute('cellPadding', '8');
}
for (var i = 0; i < rows; i++)
{
var row = table2.insertRow(i);
@ -672,11 +667,6 @@ Menus.prototype.addInsertTableItem = function(menu, insertFn, parent)
for (var j = 0; j < cols; j++)
{
var cell = row.insertCell(-1);
if (mxClient.IS_QUIRKS)
{
cell.innerHTML = quirksCellHtml;
}
}
}
@ -692,11 +682,6 @@ Menus.prototype.addInsertTableItem = function(menu, insertFn, parent)
for (var j = 0; j < picker.rows[0].cells.length; j++)
{
var cell = row.insertCell(-1);
if (mxClient.IS_QUIRKS)
{
cell.innerHTML = quirksCellHtml;
}
}
}
@ -707,11 +692,6 @@ Menus.prototype.addInsertTableItem = function(menu, insertFn, parent)
for (var j = row.cells.length; j < cols; j++)
{
var cell = row.insertCell(-1);
if (mxClient.IS_QUIRKS)
{
cell.innerHTML = quirksCellHtml;
}
}
}
};

View File

@ -318,16 +318,7 @@ Sidebar.prototype.showTooltip = function(elt, cells, w, h, title, showLabel)
var width = bounds.width + 2 * this.tooltipBorder + 4;
var height = bounds.height + 2 * this.tooltipBorder;
if (mxClient.IS_QUIRKS)
{
height += 4;
this.tooltip.style.overflow = 'hidden';
}
else
{
this.tooltip.style.overflow = 'visible';
}
this.tooltip.style.width = width + 'px';
var w2 = width;
@ -745,16 +736,7 @@ Sidebar.prototype.addSearchPalette = function(expand)
cross.setAttribute('title', mxResources.get('search'));
cross.style.position = 'relative';
cross.style.left = '-18px';
if (mxClient.IS_QUIRKS)
{
input.style.height = '28px';
cross.style.top = '-4px';
}
else
{
cross.style.top = '1px';
}
// Needed to block event transparency in IE
cross.style.background = 'url(\'' + this.editorUi.editor.transparentImage + '\')';
@ -2520,12 +2502,6 @@ Sidebar.prototype.createThumb = function(cells, width, height, parent, title, sh
{
node = this.graph.container.cloneNode(false);
node.innerHTML = this.graph.container.innerHTML;
// Workaround for clipping in older IE versions
if (mxClient.IS_QUIRKS || document.documentMode == 8)
{
node.firstChild.style.overflow = 'visible';
}
}
this.graph.getModel().clear();
@ -2546,7 +2522,7 @@ Sidebar.prototype.createThumb = function(cells, width, height, parent, title, sh
// Adds title for sidebar entries
if (this.sidebarTitles && title != null && showTitle != false)
{
var border = (mxClient.IS_QUIRKS) ? 2 * this.thumbPadding + 2: 0;
var border = 0;
parent.style.height = (this.thumbHeight + border + this.sidebarTitleSize + 8) + 'px';
var div = document.createElement('div');
@ -2571,7 +2547,7 @@ Sidebar.prototype.createItem = function(cells, title, showLabel, showTitle, widt
var elt = document.createElement('a');
elt.className = 'geItem';
elt.style.overflow = 'hidden';
var border = (mxClient.IS_QUIRKS) ? 8 + 2 * this.thumbPadding : 2 * this.thumbBorder;
var border = 2 * this.thumbBorder;
elt.style.width = (this.thumbWidth + border) + 'px';
elt.style.height = (this.thumbHeight + border) + 'px';
elt.style.padding = this.thumbPadding + 'px';
@ -4176,14 +4152,11 @@ Sidebar.prototype.addFoldingHandler = function(title, content, funct)
}));
// Prevents focus
if (!mxClient.IS_QUIRKS)
{
mxEvent.addListener(title, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown',
mxUtils.bind(this, function(evt)
{
evt.preventDefault();
}));
}
};
/**

View File

@ -74,11 +74,11 @@ Toolbar.prototype.init = function()
if (EditorUi.compactUi)
{
viewMenu.style.width = (mxClient.IS_QUIRKS) ? '58px' : '50px';
viewMenu.style.width = '50px';
}
else
{
viewMenu.style.width = (mxClient.IS_QUIRKS) ? '62px' : '36px';
viewMenu.style.width = '36px';
}
if (sw >= 420)
@ -281,7 +281,7 @@ Toolbar.prototype.addTableDropDown = function()
menuElt.style.whiteSpace = 'nowrap';
menuElt.style.overflow = 'hidden';
menuElt.innerHTML = '<div class="geSprite geSprite-table" style="margin-left:-2px;"></div>' + this.dropdownImageHtml;
menuElt.style.width = (mxClient.IS_QUIRKS) ? '50px' : '30px';
menuElt.style.width = '30px';
// Fix for item size in kennedy theme
if (EditorUi.compactUi)
@ -319,19 +319,14 @@ Toolbar.prototype.addDropDownArrow = function(menu, sprite, width, atlasWidth, l
menu.style.position = 'relative';
menu.innerHTML = '<div class="geSprite ' + sprite + '" style="margin-left:' + left + 'px;margin-top:' + top + 'px;"></div>' +
this.dropdownImageHtml;
menu.style.width = (mxClient.IS_QUIRKS) ? atlasWidth + 'px' : (atlasWidth - atlasDelta) + 'px';
if (mxClient.IS_QUIRKS)
{
menu.style.height = (EditorUi.compactUi) ? '24px' : '26px';
}
menu.style.width = (atlasWidth - atlasDelta) + 'px';
// Fix for item size in kennedy theme
if (EditorUi.compactUi)
{
menu.getElementsByTagName('img')[0].style.left = '24px';
menu.getElementsByTagName('img')[0].style.top = '5px';
menu.style.width = (mxClient.IS_QUIRKS) ? width + 'px' : (width - 10) + 'px';
menu.style.width = (width - 10) + 'px';
}
};
@ -385,7 +380,7 @@ Toolbar.prototype.createTextToolbar = function()
this.fontMenu.style.position = 'relative';
this.fontMenu.style.whiteSpace = 'nowrap';
this.fontMenu.style.overflow = 'hidden';
this.fontMenu.style.width = (mxClient.IS_QUIRKS) ? '80px' : '60px';
this.fontMenu.style.width = '60px';
this.setFontName(Menus.prototype.defaultFont);
@ -402,7 +397,7 @@ Toolbar.prototype.createTextToolbar = function()
this.sizeMenu.style.position = 'relative';
this.sizeMenu.style.whiteSpace = 'nowrap';
this.sizeMenu.style.overflow = 'hidden';
this.sizeMenu.style.width = (mxClient.IS_QUIRKS) ? '44px' : '24px';
this.sizeMenu.style.width = '24px';
this.setFontSize(Menus.prototype.defaultFontSize);
@ -477,7 +472,7 @@ Toolbar.prototype.createTextToolbar = function()
alignMenu.style.whiteSpace = 'nowrap';
alignMenu.style.overflow = 'hidden';
alignMenu.innerHTML = '<div class="geSprite geSprite-left" style="margin-left:-2px;"></div>' + this.dropdownImageHtml;
alignMenu.style.width = (mxClient.IS_QUIRKS) ? '50px' : '30px';
alignMenu.style.width = '30px';
if (EditorUi.compactUi)
{
@ -516,7 +511,7 @@ Toolbar.prototype.createTextToolbar = function()
formatMenu.style.overflow = 'hidden';
formatMenu.innerHTML = '<div class="geSprite geSprite-dots" style="margin-left:-2px;"></div>' +
this.dropdownImageHtml;
formatMenu.style.width = (mxClient.IS_QUIRKS) ? '50px' : '30px';
formatMenu.style.width = '30px';
if (EditorUi.compactUi)
{
@ -564,14 +559,14 @@ Toolbar.prototype.createTextToolbar = function()
insertMenu.style.position = 'relative';
insertMenu.innerHTML = '<div class="geSprite geSprite-plus" style="margin-left:-4px;margin-top:-3px;"></div>' +
this.dropdownImageHtml;
insertMenu.style.width = (mxClient.IS_QUIRKS) ? '36px' : '16px';
insertMenu.style.width = '16px';
// Fix for item size in kennedy theme
if (EditorUi.compactUi)
{
insertMenu.getElementsByTagName('img')[0].style.left = '24px';
insertMenu.getElementsByTagName('img')[0].style.top = '5px';
insertMenu.style.width = (mxClient.IS_QUIRKS) ? '50px' : '30px';
insertMenu.style.width = '30px';
}
this.addSeparator();
@ -787,7 +782,7 @@ Toolbar.prototype.createTextToolbar = function()
elt.style.whiteSpace = 'nowrap';
elt.style.overflow = 'hidden';
elt.innerHTML = '<div class="geSprite geSprite-table" style="margin-left:-2px;"></div>' + this.dropdownImageHtml;
elt.style.width = (mxClient.IS_QUIRKS) ? '50px' : '30px';
elt.style.width = '30px';
// Fix for item size in kennedy theme
if (EditorUi.compactUi)

View File

@ -115,12 +115,6 @@
// Updates the display
graph.getModel().endUpdate();
}
if (mxClient.IS_QUIRKS)
{
document.body.style.overflow = 'hidden';
new mxDivResizer(container);
}
}
};
</script>

View File

@ -90,7 +90,7 @@
}
// Writes back to cell if checkbox is clicked
mxEvent.addListener(checkbox, (mxClient.IS_QUIRKS) ? 'click' : 'change', function(evt)
mxEvent.addListener(checkbox, 'change', function(evt)
{
var elt = cell.value.cloneNode(true);
elt.setAttribute('checked', (checkbox.checked) ? 'true' : 'false');

View File

@ -53,13 +53,6 @@
// Disables built-in context menu
mxEvent.disableContextMenu(container);
// Workaround for Internet Explorer ignoring certain styles
if (mxClient.IS_QUIRKS)
{
document.body.style.overflow = 'hidden';
new mxDivResizer(container);
}
document.body.appendChild(container);
// Creates the graph inside the DOM node.

View File

@ -123,10 +123,6 @@
},
function (evt)
{
if (mxClient.IS_QUIRKS)
{
graph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt, state));
}
});
if (!mxClient.IS_TOUCH)

View File

@ -44,13 +44,6 @@
container.style.bottom = '0px';
container.style.background = 'url("editors/images/grid.gif")';
// Workaround for Internet Explorer ignoring certain styles
if (mxClient.IS_QUIRKS)
{
document.body.style.overflow = 'hidden';
new mxDivResizer(container);
}
document.body.appendChild(container);
// Creates the graph inside the given container

View File

@ -49,13 +49,6 @@
mxEvent.disableContextMenu(container);
if (mxClient.IS_QUIRKS)
{
document.body.style.overflow = 'hidden';
new mxDivResizer(container);
new mxDivResizer(outline);
}
// Sets a gradient background
if (mxClient.IS_GC || mxClient.IS_SF)
{

View File

@ -47,13 +47,6 @@
document.body.appendChild(container);
// Workaround for Internet Explorer ignoring certain styles
if (mxClient.IS_QUIRKS)
{
document.body.style.overflow = 'hidden';
new mxDivResizer(container);
}
// Creates the graph inside the given container
var graph = new mxGraph(container);

View File

@ -63,17 +63,6 @@
// Enables snapping waypoints to terminals
mxEdgeHandler.prototype.snapToTerminals = true;
// Workaround for Internet Explorer ignoring certain CSS directives
if (mxClient.IS_QUIRKS)
{
document.body.style.overflow = 'hidden';
new mxDivResizer(container);
new mxDivResizer(outline);
new mxDivResizer(toolbar);
new mxDivResizer(sidebar);
new mxDivResizer(status);
}
// Creates a wrapper editor with a graph inside the given container.
// The editor is used to create certain functionality for the
// graph, such as the rubberband selection, but most parts

View File

@ -105,12 +105,6 @@
// Updates the display
graph.getModel().endUpdate();
}
if (mxClient.IS_QUIRKS)
{
document.body.style.overflow = 'hidden';
new mxDivResizer(container);
}
}
};
</script>

View File

@ -63,17 +63,6 @@
var checkImage = new Image();
checkImage.src = "images/check.png";
// Workaround for Internet Explorer ignoring certain CSS directives
if (mxClient.IS_QUIRKS)
{
document.body.style.overflow = 'hidden';
new mxDivResizer(container);
new mxDivResizer(outline);
new mxDivResizer(toolbar);
new mxDivResizer(sidebar);
new mxDivResizer(status);
}
// Creates the graph inside the given container. The
// editor is used to create certain functionality for the
// graph, such as the rubberband selection, but most parts
@ -500,11 +489,6 @@
mxUtils.setOpacity(background, 50);
document.body.appendChild(background);
if (mxClient.IS_QUIRKS)
{
new mxDivResizer(background);
}
var x = Math.max(0, document.body.scrollWidth/2-width/2);
var y = Math.max(10, (document.body.scrollHeight ||
document.documentElement.scrollHeight)/2-height*2/3);

View File

@ -90,12 +90,6 @@
// This will automatically disable the highlighting of the source vertex.
mxConnectionHandler.prototype.connectImage = new mxImage('images/connector.gif', 16, 16);
// Support for certain CSS styles in quirks mode
if (mxClient.IS_QUIRKS)
{
new mxDivResizer(container);
}
// Disables the context menu
mxEvent.disableContextMenu(container);

View File

@ -64,14 +64,6 @@
document.body.appendChild(container);
// Workaround for Internet Explorer ignoring certain styles
if (mxClient.IS_QUIRKS)
{
document.body.style.overflow = 'hidden';
new mxDivResizer(tbContainer);
new mxDivResizer(container);
}
// Creates the model and the graph inside the container
// using the fastest rendering available on the browser
var model = new mxGraphModel();

View File

@ -1613,11 +1613,6 @@ class mxEditor extends mxEventSource {
if (this.disableContextMenu) {
mxEvent.disableContextMenu(container);
}
// Workaround for stylesheet directives in IE
if (mxClient.IS_QUIRKS) {
new mxDivResizer(container);
}
}
};
@ -1806,11 +1801,6 @@ class mxEditor extends mxEventSource {
*/
setToolbarContainer=(container)=>{
this.toolbar.init(container);
// Workaround for stylesheet directives in IE
if (mxClient.IS_QUIRKS) {
new mxDivResizer(container);
}
};
/**
@ -1844,11 +1834,6 @@ class mxEditor extends mxEventSource {
this.setStatus((mxResources.get(this.currentFileResource) ||
this.currentFileResource) + ': ' + this.filename);
}));
// Workaround for stylesheet directives in IE
if (mxClient.IS_QUIRKS) {
new mxDivResizer(container);
}
}
};
@ -1882,11 +1867,6 @@ class mxEditor extends mxEventSource {
this.addListener(mxEvent.ROOT, mxUtils.bind(this, (sender)=>{
container.innerHTML = this.getTitle();
}));
// Workaround for stylesheet directives in IE
if (mxClient.IS_QUIRKS) {
new mxDivResizer(container);
}
};
/**

View File

@ -210,24 +210,6 @@ repaint = ()=>{
this.shape.setCursor(this.state.shape.getCursor());
}
// Workaround for event transparency in VML with transparent color
// is to use a non-transparent color with near zero opacity
if (mxClient.IS_QUIRKS || document.documentMode == 8)
{
if (this.shape.stroke == 'transparent')
{
// KNOWN: Quirks mode does not seem to catch events if
// we do not force an update of the DOM via a change such
// as mxLog.debug. Since IE6 is EOL we do not add a fix.
this.shape.stroke = 'white';
this.shape.opacity = 1;
}
else
{
this.shape.opacity = this.opacity;
}
}
this.shape.redraw();
}
};
@ -275,8 +257,7 @@ isHighlightAt = (x, y)=>{
{
var hit = false;
// Quirks mode is currently not supported as it used a different coordinate system
if (this.shape != null && document.elementFromPoint != null && !mxClient.IS_QUIRKS)
if (this.shape != null && document.elementFromPoint != null)
{
var elt = document.elementFromPoint(x, y);

View File

@ -428,17 +428,6 @@ setFocus = (me, state, source)=>
icon.preserveImageAspect = false;
icon.init(this.graph.getView().getDecoratorPane());
// Fixes lost event tracking for images in quirks / IE8 standards
if (mxClient.IS_QUIRKS || document.documentMode == 8)
{
mxEvent.addListener(icon.node, 'dragstart', (evt)=>
{
mxEvent.consume(evt);
return false;
});
}
// Move the icon behind all other overlays
if (icon.node.previousSibling != null)
{

View File

@ -758,17 +758,6 @@ initBend = (bend, dblClick)=>
mxEvent.redirectMouseEvents(bend.node, this.graph, this.state,
null, null, null, dblClick);
// Fixes lost event tracking for images in quirks / IE8 standards
if (mxClient.IS_QUIRKS || document.documentMode == 8)
{
mxEvent.addListener(bend.node, 'dragstart', (evt)=>
{
mxEvent.consume(evt);
return false;
});
}
if (mxClient.IS_TOUCH)
{
bend.node.setAttribute('pointer-events', 'none');

View File

@ -45,20 +45,6 @@ var mxClient = {
*/
IS_EM: 'spellcheck' in document.createElement('textarea') && document.documentMode == 8,
/**
* Variable: VML_PREFIX
*
* Prefix for VML namespace in node names. Default is 'v'.
*/
VML_PREFIX: 'v',
/**
* Variable: OFFICE_PREFIX
*
* Prefix for VML office namespace in node names. Default is 'o'.
*/
OFFICE_PREFIX: 'o',
/**
* Variable: IS_NS
*

View File

@ -170,8 +170,7 @@ class mxImageShape extends mxRectangleShape {
this.node.style.borderColor = stroke;
// VML image supports PNG in IE6
var useVml = false;
var img = document.createElement((useVml) ? mxClient.VML_PREFIX + ':image' : 'img');
var img = document.createElement('img');
img.setAttribute('border', '0');
img.style.position = 'absolute';
img.src = this.image;

View File

@ -316,18 +316,6 @@ class mxShape {
return document.createElementNS(mxConstants.NS_SVG, 'g');
};
/**
* Function: createVml
*
* Creates and returns the VML node to represent this shape.
*/
createVml = () => {
var node = document.createElement(mxClient.VML_PREFIX + ':group');
node.style.position = 'absolute';
return node;
};
/**
* Function: createHtml
*
@ -483,20 +471,6 @@ class mxShape {
this.bounds.width > 0 && this.bounds.height > 0);
};
/**
* Function: createVmlGroup
*
* Returns the temporary element used for rendering in IE8 standards mode.
*/
createVmlGroup = () => {
var node = document.createElement(mxClient.VML_PREFIX + ':group');
node.style.position = 'absolute';
node.style.width = this.node.style.width;
node.style.height = this.node.style.height;
return node;
};
/**
* Function: redrawShape
*

View File

@ -873,9 +873,6 @@ class mxText extends mxShape {
oh = sizeDiv.offsetHeight + 2;
if (mxClient.IS_QUIRKS && this.border != null && this.border != mxConstants.NONE) {
oh += 3;
}
} else if (sizeDiv.firstChild != null && sizeDiv.firstChild.nodeName == 'DIV') {
sizeDiv = sizeDiv.firstChild;
oh = sizeDiv.offsetHeight;
@ -903,13 +900,7 @@ class mxText extends mxShape {
this.offsetWidth = ow;
this.offsetHeight = oh;
// Simulates max-height CSS in quirks mode
if (mxClient.IS_QUIRKS && (this.clipped || (this.overflow == 'width' && h > 0))) {
h = Math.min(h, oh);
style.height = Math.round(h) + 'px';
} else {
h = oh;
}
if (this.overflow != 'fill' && this.overflow != 'width') {
if (this.clipped) {
@ -917,11 +908,6 @@ class mxText extends mxShape {
}
w = ow;
// Simulates max-width CSS in quirks mode
if ((mxClient.IS_QUIRKS && this.clipped) || this.wrap) {
style.width = Math.round(w) + 'px';
}
}
h *= s;
@ -969,16 +955,6 @@ class mxText extends mxShape {
// Workaround for rendering offsets
var dy = 0;
if (this.overflow != 'fill' && mxClient.IS_QUIRKS) {
if (this.valign == mxConstants.ALIGN_TOP) {
dy -= 1;
} else if (this.valign == mxConstants.ALIGN_BOTTOM) {
dy += 2;
} else {
dy += 1;
}
}
style.zoom = s;
style.left = Math.round(this.bounds.x + left_fix - w / 2) + 'px';
style.top = Math.round(this.bounds.y + top_fix - h / 2 + dy) + 'px';
@ -1117,12 +1093,8 @@ class mxText extends mxShape {
if (this.clipped) {
style.overflow = 'hidden';
if (!mxClient.IS_QUIRKS) {
style.maxHeight = h + 'px';
style.maxWidth = w + 'px';
} else {
style.width = w + 'px';
}
} else if (this.overflow == 'fill') {
style.width = (w + 1) + 'px';
style.height = (h + 1) + 'px';

View File

@ -281,12 +281,6 @@ addItem = (title, image, funct, parent, iconCls, enabled, active, noHover)=>
}
}
// Workaround for lost current selection in page because of focus in IE
if (document.selection != null && (mxClient.IS_QUIRKS || document.documentMode == 8))
{
currentSelection = document.selection.createRange();
}
mxEvent.consume(evt);
}),
mxUtils.bind(this, (evt)=>

View File

@ -1843,8 +1843,7 @@ mxSvgCanvas2addTextBackground = (node, str, x, y, w, h, align, valign, overflow)
div.style.whiteSpace = 'nowrap';
div.style.position = 'absolute';
div.style.visibility = 'hidden';
div.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
div.style.zoom = '1';
div.style.display = 'inline-block';
if ((s.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD)
{

View File

@ -2299,16 +2299,12 @@ var mxUtils = {
* if no document is given.
*/
getDocumentScrollOrigin: (doc) => {
if (mxClient.IS_QUIRKS) {
return new mxPoint(doc.body.scrollLeft, doc.body.scrollTop);
} else {
var wnd = doc.defaultView || doc.parentWindow;
var x = (wnd != null && window.pageXOffset !== undefined) ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body).scrollLeft;
var y = (wnd != null && window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
return new mxPoint(x, y);
}
},
/**
@ -3132,8 +3128,7 @@ var mxUtils = {
// Disables block layout and outside wrapping and hides the div
div.style.position = 'absolute';
div.style.visibility = 'hidden';
div.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
div.style.zoom = '1';
div.style.display = 'inline-block';
if (textWidth != null) {
div.style.width = textWidth + 'px';

File diff suppressed because it is too large Load Diff

View File

@ -326,22 +326,14 @@ init = (x, y, width, height, style)=>
// Workaround for table size problems in FF
if (width != null)
{
if (!mxClient.IS_QUIRKS)
{
this.div.style.width = width + 'px';
}
this.table.style.width = width + 'px';
}
if (height != null)
{
if (!mxClient.IS_QUIRKS)
{
this.div.style.height = height + 'px';
}
this.table.style.height = height + 'px';
}
@ -379,7 +371,7 @@ init = (x, y, width, height, style)=>
// Workaround for div around div restricts height
// of inner div if outerdiv has hidden overflow
if (mxClient.IS_QUIRKS || this.content.nodeName.toUpperCase() != 'DIV')
if (this.content.nodeName.toUpperCase() != 'DIV')
{
this.contentWrapper.style.height = '100%';
}
@ -620,20 +612,14 @@ setSize = (width, height)=>
height = Math.max(this.minimumSize.height, height);
// Workaround for table size problems in FF
if (!mxClient.IS_QUIRKS)
{
this.div.style.width = width + 'px';
this.div.style.height = height + 'px';
}
this.table.style.width = width + 'px';
this.table.style.height = height + 'px';
if (!mxClient.IS_QUIRKS)
{
this.contentWrapper.style.height = (this.div.offsetHeight -
this.title.offsetHeight - this.contentHeightCorrection) + 'px';
}
};
/**
@ -698,22 +684,14 @@ installMinimizeHandler = ()=>
var minSize = this.getMinimumSize();
if (minSize.height > 0)
{
if (!mxClient.IS_QUIRKS)
{
this.div.style.height = minSize.height + 'px';
}
this.table.style.height = minSize.height + 'px';
}
if (minSize.width > 0)
{
if (!mxClient.IS_QUIRKS)
{
this.div.style.width = minSize.width + 'px';
}
this.table.style.width = minSize.width + 'px';
}
@ -732,12 +710,7 @@ installMinimizeHandler = ()=>
this.minimize.setAttribute('title', 'Minimize');
this.contentWrapper.style.display = ''; // default
this.maximize.style.display = maxDisplay;
if (!mxClient.IS_QUIRKS)
{
this.div.style.height = height;
}
this.table.style.height = height;
if (this.resize != null)
@ -815,11 +788,8 @@ installMaximizeHandler = ()=>
this.div.style.top = '0px';
var docHeight = Math.max(document.body.clientHeight || 0, document.documentElement.clientHeight || 0);
if (!mxClient.IS_QUIRKS)
{
this.div.style.width = (document.body.clientWidth - 2) + 'px';
this.div.style.height = (docHeight - 2) + 'px';
}
this.table.style.width = (document.body.clientWidth - 2) + 'px';
this.table.style.height = (docHeight - 2) + 'px';
@ -829,8 +799,6 @@ installMaximizeHandler = ()=>
this.resize.style.visibility = 'hidden';
}
if (!mxClient.IS_QUIRKS)
{
var style = mxUtils.getCurrentStyle(this.contentWrapper);
if (style.overflow == 'auto' || this.resize != null)
@ -838,7 +806,6 @@ installMaximizeHandler = ()=>
this.contentWrapper.style.height = (this.div.offsetHeight -
this.title.offsetHeight - this.contentHeightCorrection) + 'px';
}
}
this.fireEvent(new mxEventObject(mxEvent.MAXIMIZE, 'event', evt));
}
@ -855,8 +822,6 @@ installMaximizeHandler = ()=>
this.div.style.left = x+'px';
this.div.style.top = y+'px';
if (!mxClient.IS_QUIRKS)
{
this.div.style.height = height;
this.div.style.width = width;
@ -867,7 +832,6 @@ installMaximizeHandler = ()=>
this.contentWrapper.style.height = (this.div.offsetHeight -
this.title.offsetHeight - this.contentHeightCorrection) + 'px';
}
}
this.table.style.height = height;
this.table.style.width = width;
@ -1088,7 +1052,7 @@ show = ()=>
var style = mxUtils.getCurrentStyle(this.contentWrapper);
if (!mxClient.IS_QUIRKS && (style.overflow == 'auto' || this.resize != null) &&
if ((style.overflow == 'auto' || this.resize != null) &&
this.contentWrapper.style.display != 'none')
{
this.contentWrapper.style.height = (this.div.offsetHeight -

View File

@ -336,7 +336,7 @@ send = (onload, onerror, timeout, ontimeout)=>
this.request.withCredentials = 'true';
}
if (!mxClient.IS_QUIRKS && (document.documentMode == null || document.documentMode > 9) &&
if ((document.documentMode == null || document.documentMode > 9) &&
window.XMLHttpRequest && timeout != null && ontimeout != null)
{
this.request.timeout = timeout;

View File

@ -316,14 +316,7 @@ setAlign = function (align)
getInitialValue = (state, trigger)=>
{
var result = mxUtils.htmlEntities(this.graph.getEditingValue(state.cell, trigger), false);
// Workaround for trailing line breaks being ignored in the editor
if (!mxClient.IS_QUIRKS && document.documentMode != 8 && document.documentMode != 9 &&
document.documentMode != 10)
{
result = mxUtils.replaceTrailingNewlines(result, '<div><br></div>');
}
return result.replace(/\n/g, '<br>');
};
@ -522,16 +515,8 @@ resize = ()=>
this.textarea.style.height = Math.round(this.bounds.height / scale) + 'px';
// FIXME: Offset when scaled
if (document.documentMode == 8 || mxClient.IS_QUIRKS)
{
this.textarea.style.left = Math.round(this.bounds.x) + 'px';
this.textarea.style.top = Math.round(this.bounds.y) + 'px';
}
else
{
this.textarea.style.left = Math.max(0, Math.round(this.bounds.x + 1)) + 'px';
this.textarea.style.top = Math.max(0, Math.round(this.bounds.y + 1)) + 'px';
}
// Installs native word wrapping and avoids word wrap for empty label placeholder
if (this.graph.isWrapping(state.cell) && (this.bounds.width >= 2 || this.bounds.height >= 2) &&
@ -642,14 +627,6 @@ resize = ()=>
this.textarea.style.width = '';
}
// LATER: Keep in visible area, add fine tuning for pixel precision
// Workaround for wrong measuring in IE8 standards
if (document.documentMode == 8)
{
this.textarea.style.zoom = '1';
this.textarea.style.height = 'auto';
}
var ow = this.textarea.scrollWidth;
var oh = this.textarea.scrollHeight;
@ -661,26 +638,9 @@ resize = ()=>
//}
// LATER: Keep in visible area, add fine tuning for pixel precision
if (document.documentMode == 8)
{
// LATER: Scaled wrapping and position is wrong in IE8
this.textarea.style.left = Math.max(0, Math.ceil((this.bounds.x - m.x * (this.bounds.width - (ow + 1) * scale) + ow * (scale - 1) * 0 + (m.x + 0.5) * 2) / scale)) + 'px';
this.textarea.style.top = Math.max(0, Math.ceil((this.bounds.y - m.y * (this.bounds.height - (oh + 0.5) * scale) + oh * (scale - 1) * 0 + Math.abs(m.y + 0.5) * 1) / scale)) + 'px';
// Workaround for wrong event handling width and height
this.textarea.style.width = Math.round(ow * scale) + 'px';
this.textarea.style.height = Math.round(oh * scale) + 'px';
}
else if (mxClient.IS_QUIRKS)
{
this.textarea.style.left = Math.max(0, Math.ceil(this.bounds.x - m.x * (this.bounds.width - (ow + 1) * scale) + ow * (scale - 1) * 0 + (m.x + 0.5) * 2)) + 'px';
this.textarea.style.top = Math.max(0, Math.ceil(this.bounds.y - m.y * (this.bounds.height - (oh + 0.5) * scale) + oh * (scale - 1) * 0 + Math.abs(m.y + 0.5) * 1)) + 'px';
}
else
{
this.textarea.style.left = Math.max(0, Math.round(this.bounds.x - m.x * (this.bounds.width - 2)) + 1) + 'px';
this.textarea.style.top = Math.max(0, Math.round(this.bounds.y - m.y * (this.bounds.height - 4) + ((m.y == -1) ? 3 : 0)) + 1) + 'px';
}
}
mxUtils.setPrefixedStyle(this.textarea.style, 'transformOrigin', '0px 0px');
mxUtils.setPrefixedStyle(this.textarea.style, 'transform',

View File

@ -1681,14 +1681,6 @@ init = (container)=>
this.tooltipHandler.hide();
}
}));
// Workaround for missing last shape and connect preview in IE8 standards
// mode if no initial graph displayed or no label for shape defined
if (document.documentMode == 8)
{
container.insertAdjacentHTML('beforeend', '<' + mxClient.VML_PREFIX + ':group' +
' style="DISPLAY: none;"></' + mxClient.VML_PREFIX + ':group>');
}
};
/**
@ -3153,18 +3145,10 @@ sizeDidChange = ()=>
}
}
else
{
if (mxClient.IS_QUIRKS)
{
// Quirks mode does not support minWidth/-Height
this.view.updateHtmlCanvasSize(Math.max(1, width), Math.max(1, height));
}
else
{
this.view.canvas.style.minWidth = Math.max(1, width) + 'px';
this.view.canvas.style.minHeight = Math.max(1, height) + 'px';
}
}
this.updatePageBreaks(this.pageBreaksVisible, width, height);
}
@ -12892,8 +12876,7 @@ fireMouseEvent = (evtName, me, sender)=>
{
var currentTime = new Date().getTime();
// NOTE: Second mouseDown for double click missing in quirks mode
if ((!mxClient.IS_QUIRKS && evtName == mxEvent.MOUSE_DOWN) || (mxClient.IS_QUIRKS && evtName == mxEvent.MOUSE_UP && !this.fireDoubleClick))
if (evtName == mxEvent.MOUSE_DOWN)
{
if (this.lastTouchEvent != null && this.lastTouchEvent != me.getEvent() &&
currentTime - this.lastTouchTime < this.doubleTapTimeout &&
@ -12912,16 +12895,6 @@ fireMouseEvent = (evtName, me, sender)=>
var cell = this.lastTouchCell;
this.lastTouchCell = null;
// Fires native dblclick event via event source
// NOTE: This fires two double click events on edges in quirks mode. While
// trying to fix this, we realized that nativeDoubleClick can be disabled for
// quirks and IE10+ (or we didn't find the case mentioned above where it
// would not work), ie. all double clicks seem to be working without this.
if (mxClient.IS_QUIRKS)
{
me.getSource().fireEvent('ondblclick');
}
this.dblClick(me.getEvent(), cell);
doubleClickFired = true;
}
@ -12932,8 +12905,7 @@ fireMouseEvent = (evtName, me, sender)=>
this.lastTouchTime = 0;
}
// Do not ignore mouse up in quirks in this case
if (!mxClient.IS_QUIRKS || doubleClickFired)
if (doubleClickFired)
{
mxEvent.consume(me.getEvent());
return;

View File

@ -555,53 +555,12 @@ validate = (cell)=>
this.resetValidationState();
// Improves IE rendering speed by minimizing reflows
var prevDisplay = null;
if (this.optimizeVmlReflows && this.canvas != null && this.textDiv == null &&
((document.documentMode == 8 && !mxClient.IS_EM) || mxClient.IS_QUIRKS))
{
// Placeholder keeps scrollbar positions when canvas is hidden
this.placeholder = document.createElement('div');
this.placeholder.style.position = 'absolute';
this.placeholder.style.width = this.canvas.clientWidth + 'px';
this.placeholder.style.height = this.canvas.clientHeight + 'px';
this.canvas.parentNode.appendChild(this.placeholder);
prevDisplay = this.drawPane.style.display;
this.canvas.style.display = 'none';
// Creates temporary DIV used for text measuring in mxText.updateBoundingBox
this.textDiv = document.createElement('div');
this.textDiv.style.position = 'absolute';
this.textDiv.style.whiteSpace = 'nowrap';
this.textDiv.style.visibility = 'hidden';
this.textDiv.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
this.textDiv.style.zoom = '1';
document.body.appendChild(this.textDiv);
}
var graphBounds = this.getBoundingBox(this.validateCellState(
this.validateCell(cell || ((this.currentRoot != null) ?
this.currentRoot : this.graph.getModel().getRoot()))));
this.setGraphBounds((graphBounds != null) ? graphBounds : this.getEmptyBounds());
this.validateBackground();
if (prevDisplay != null)
{
this.canvas.style.display = prevDisplay;
this.textDiv.parentNode.removeChild(this.textDiv);
if (this.placeholder != null)
{
this.placeholder.parentNode.removeChild(this.placeholder);
}
// Textdiv cannot be reused
this.textDiv = null;
}
this.resetValidationState();
window.status = mxResources.get(this.doneResource) ||
@ -2721,21 +2680,6 @@ createHtml = ()=>
container.appendChild(this.canvas);
this.updateContainerStyle(container);
// Implements minWidth/minHeight in quirks mode
if (mxClient.IS_QUIRKS)
{
var onResize = mxUtils.bind(this, (evt)=>
{
var bounds = this.getGraphBounds();
var width = bounds.x + bounds.width + this.graph.border;
var height = bounds.y + bounds.height + this.graph.border;
this.updateHtmlCanvasSize(width, height);
});
mxEvent.addListener(window, 'resize', onResize);
}
}
};
@ -2827,30 +2771,6 @@ createVml = ()=>
}
};
/**
* Function: createVmlPane
*
* Creates a drawing pane in VML (group).
*/
createVmlPane = (width, height)=>
{
var pane = document.createElement(mxClient.VML_PREFIX + ':group');
// At this point the width and height are potentially
// uninitialized. That's OK.
pane.style.position = 'absolute';
pane.style.left = '0px';
pane.style.top = '0px';
pane.style.width = width + 'px';
pane.style.height = height + 'px';
pane.setAttribute('coordsize', width + ',' + height);
pane.setAttribute('coordorigin', '0,0');
return pane;
};
/**
* Function: createSvg
*