started removing support for IE6-11

development
mcyph 2021-03-20 14:48:12 +11:00
parent 601c0f3724
commit b416ac578f
36 changed files with 1584 additions and 2731 deletions

View File

@ -45,20 +45,7 @@
// Workaround for event redirection via image tag in quirks and IE8
function createImage(src)
{
if (mxClient.IS_IE && !mxClient.IS_SVG)
{
var img = document.createElement('div');
img.style.backgroundImage = 'url(' + src + ')';
img.style.backgroundPosition = 'center';
img.style.backgroundRepeat = 'no-repeat';
img.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
return img;
}
else
{
return mxUtils.createImage(src);
}
return mxUtils.createImage(src);
};
// Delete

View File

@ -127,15 +127,6 @@
img.style.height = '48px';
document.body.appendChild(img);
// Disables built-in DnD in IE (this is needed for cross-frame DnD, see below)
if (mxClient.IS_IE)
{
mxEvent.addListener(img, 'dragstart', function(evt)
{
evt.returnValue = false;
});
}
// Creates the element that is being for the actual preview.
var dragElt = document.createElement('div');
dragElt.style.border = 'dashed black 1px';

View File

@ -131,13 +131,6 @@
}
textNode.originalValue = null;
// Makes sure nothing is selected in IE
if (mxClient.IS_IE)
{
mxUtils.clearSelection();
}
textNode.style.display = 'none';
// Moves the focus back to the graph

View File

@ -35,13 +35,6 @@ var ColorDialog = function(editorUi, color, apply, cancelFn)
input.style.marginBottom = '10px';
input.style.width = '216px';
// Required for picker to render in IE
if (mxClient.IS_IE)
{
input.style.marginTop = '10px';
document.body.appendChild(input);
}
var applyFunction = (apply != null) ? apply : this.createApplyFunction();
function doApply()
@ -1320,7 +1313,7 @@ var EditDataDialog = function(ui, cell)
var img = mxUtils.createImage(Dialog.prototype.closeImage);
img.style.height = '9px';
img.style.fontSize = '9px';
img.style.marginBottom = (mxClient.IS_IE11) ? '-1px' : '5px';
img.style.marginBottom = '5px';
removeAttr.className = 'geButton';
removeAttr.setAttribute('title', mxResources.get('delete'));
@ -1443,7 +1436,7 @@ var EditDataDialog = function(ui, cell)
var nameInput = document.createElement('input');
nameInput.setAttribute('placeholder', mxResources.get('enterPropertyName'));
nameInput.setAttribute('type', 'text');
nameInput.setAttribute('size', (mxClient.IS_IE || mxClient.IS_IE11) ? '36' : '40');
nameInput.setAttribute('size', '40');
nameInput.style.boxSizing = 'border-box';
nameInput.style.marginLeft = '2px';
nameInput.style.width = '100%';
@ -1635,7 +1628,7 @@ var EditDataDialog = function(ui, cell)
icon.style.width = '16px';
icon.setAttribute('border', '0');
icon.setAttribute('valign', 'middle');
icon.style.marginTop = (mxClient.IS_IE11) ? '0px' : '-4px';
icon.style.marginTop = '-4px';
icon.setAttribute('src', Editor.helpImage);
link.appendChild(icon);
@ -2360,8 +2353,7 @@ var LayersWindow = function(editorUi, x, y, w, h)
if (graph.isEnabled())
{
// Fallback if no drag and drop is available
if (mxClient.IS_TOUCH || mxClient.IS_POINTER || mxClient.IS_VML ||
(mxClient.IS_IE && document.documentMode < 10))
if (mxClient.IS_TOUCH || mxClient.IS_POINTER)
{
var right = document.createElement('div');
right.style.display = 'block';
@ -2429,7 +2421,7 @@ var LayersWindow = function(editorUi, x, y, w, h)
ldiv.appendChild(right);
}
if (mxClient.IS_SVG && (!mxClient.IS_IE || document.documentMode >= 10))
if (mxClient.IS_SVG)
{
ldiv.setAttribute('draggable', 'true');
ldiv.style.cursor = 'move';

View File

@ -2042,8 +2042,7 @@ var FilenameDialog = function(editorUi, filename, buttonText, fn, label, validat
mxEvent.addListener(dlg, 'dragover', mxUtils.bind(this, function(evt)
{
// IE 10 does not implement pointer-events so it can't have a drop highlight
if (dropElt == null && (!mxClient.IS_IE || document.documentMode > 10))
if (dropElt == null)
{
dropElt = nameInput;
dropElt.style.backgroundColor = '#ebf2f9';

View File

@ -121,15 +121,8 @@ EditorUi = function(editor, container, lightbox)
return textEditing(evt);
};
if (mxClient.IS_IE && (typeof(document.documentMode) === 'undefined' || document.documentMode < 9))
{
mxEvent.addListener(this.diagramContainer, 'contextmenu', linkHandler);
}
else
{
// Allows browser context menu outside of diagram and sidebar
this.diagramContainer.oncontextmenu = linkHandler;
}
// Allows browser context menu outside of diagram and sidebar
this.diagramContainer.oncontextmenu = linkHandler;
}
else
{
@ -3585,7 +3578,7 @@ EditorUi.prototype.refresh = function(sizeDidChange)
{
sizeDidChange = (sizeDidChange != null) ? sizeDidChange : true;
var quirks = mxClient.IS_IE && (document.documentMode == null || document.documentMode == 5);
var quirks = false;
var w = this.container.clientWidth;
var h = this.container.clientHeight;

View File

@ -3129,7 +3129,7 @@ TextFormatPanel.prototype.addFont = function(container)
{
// IE does not support containsNode
// KNOWN: Fixes font size issues but bypasses undo
if (window.getSelection && !mxClient.IS_IE && !mxClient.IS_IE11)
if (window.getSelection)
{
var selection = window.getSelection();
var container = (selection.rangeCount > 0) ? selection.getRangeAt(0).commonAncestorContainer :
@ -3821,15 +3821,7 @@ TextFormatPanel.prototype.addFont = function(container)
function setSelected(elt, selected)
{
if (mxClient.IS_IE && (mxClient.IS_QUIRKS || document.documentMode < 10))
{
elt.style.filter = (selected) ? 'progid:DXImageTransform.Microsoft.Gradient('+
'StartColorStr=\'#c5ecff\', EndColorStr=\'#87d4fb\', GradientType=0)' : '';
}
else
{
elt.style.backgroundImage = (selected) ? 'linear-gradient(#c5ecff 0px,#87d4fb 100%)' : '';
}
elt.style.backgroundImage = (selected) ? 'linear-gradient(#c5ecff 0px,#87d4fb 100%)' : '';
};
var listener = mxUtils.bind(this, function(sender, evt, force)
@ -4022,7 +4014,7 @@ TextFormatPanel.prototype.addFont = function(container)
var elts = node.getElementsByTagName('*');
// IE does not support containsNode
if (elts.length > 0 && window.getSelection && !mxClient.IS_IE && !mxClient.IS_IE11)
if (elts.length > 0 && window.getSelection)
{
var selection = window.getSelection();
@ -4207,7 +4199,7 @@ TextFormatPanel.prototype.addFont = function(container)
}
};
if (mxClient.IS_FF || mxClient.IS_EDGE || mxClient.IS_IE || mxClient.IS_IE11)
if (mxClient.IS_FF || mxClient.IS_EDGE)
{
mxEvent.addListener(graph.cellEditor.textarea, 'DOMSubtreeModified', updateCssHandler);
}

View File

@ -4226,36 +4226,11 @@ HoverIcons.prototype.isResetEvent = function(evt, allowShift)
HoverIcons.prototype.createArrow = function(img, tooltip)
{
var arrow = null;
if (mxClient.IS_IE && !mxClient.IS_SVG)
{
// Workaround for PNG images in IE6
if (mxClient.IS_IE6 && document.compatMode != 'CSS1Compat')
{
arrow = document.createElement(mxClient.VML_PREFIX + ':image');
arrow.setAttribute('src', img.src);
arrow.style.borderStyle = 'none';
}
else
{
arrow = document.createElement('div');
arrow.style.backgroundImage = 'url(' + img.src + ')';
arrow.style.backgroundPosition = 'center';
arrow.style.backgroundRepeat = 'no-repeat';
}
arrow.style.width = (img.width + 4) + 'px';
arrow.style.height = (img.height + 4) + 'px';
arrow.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
}
else
{
arrow = mxUtils.createImage(img.src);
arrow.style.width = img.width + 'px';
arrow.style.height = img.height + 'px';
arrow.style.padding = this.tolerance + 'px';
}
arrow = mxUtils.createImage(img.src);
arrow.style.width = img.width + 'px';
arrow.style.height = img.height + 'px';
arrow.style.padding = this.tolerance + 'px';
if (tooltip != null)
{
arrow.setAttribute('title', tooltip);
@ -9648,13 +9623,8 @@ if (typeof mxVertexHandler != 'undefined')
if ((this.graph.getModel().isEdge(parent) && geo != null && geo.relative) ||
this.graph.getModel().isEdge(cell))
{
// Quirks does not support outline at all so use border instead
if (mxClient.IS_QUIRKS)
{
this.textarea.style.border = 'gray dotted 1px';
}
// IE>8 and FF on Windows uses outline default of none
else if (mxClient.IS_IE || mxClient.IS_IE11 || (mxClient.IS_FF && mxClient.IS_WIN))
// FF on Windows uses outline default of none
if (mxClient.IS_FF && mxClient.IS_WIN)
{
this.textarea.style.outline = 'gray dotted 1px';
}
@ -9663,11 +9633,6 @@ if (typeof mxVertexHandler != 'undefined')
this.textarea.style.outline = '';
}
}
else if (mxClient.IS_QUIRKS)
{
this.textarea.style.outline = 'none';
this.textarea.style.border = '';
}
}
/**

View File

@ -2560,11 +2560,6 @@ Sidebar.prototype.createThumb = function(cells, width, height, parent, title, sh
div.style.color = '#303030';
div.style.textAlign = 'center';
div.style.whiteSpace = 'nowrap';
if (mxClient.IS_IE)
{
div.style.height = (this.sidebarTitleSize + 12) + 'px';
}
div.style.paddingTop = '4px';
mxUtils.write(div, title);
@ -3286,35 +3281,10 @@ Sidebar.prototype.createDragSource = function(elt, dropHandler, preview, cells,
function createArrow(img, tooltip)
{
var arrow = null;
if (mxClient.IS_IE && !mxClient.IS_SVG)
{
// Workaround for PNG images in IE6
if (mxClient.IS_IE6 && document.compatMode != 'CSS1Compat')
{
arrow = document.createElement(mxClient.VML_PREFIX + ':image');
arrow.setAttribute('src', img.src);
arrow.style.borderStyle = 'none';
}
else
{
arrow = document.createElement('div');
arrow.style.backgroundImage = 'url(' + img.src + ')';
arrow.style.backgroundPosition = 'center';
arrow.style.backgroundRepeat = 'no-repeat';
}
arrow.style.width = (img.width + 4) + 'px';
arrow.style.height = (img.height + 4) + 'px';
arrow.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
}
else
{
arrow = mxUtils.createImage(img.src);
arrow.style.width = img.width + 'px';
arrow.style.height = img.height + 'px';
}
arrow = mxUtils.createImage(img.src);
arrow.style.width = img.width + 'px';
arrow.style.height = img.height + 'px';
if (tooltip != null)
{
arrow.setAttribute('title', tooltip);
@ -4163,13 +4133,8 @@ Sidebar.prototype.addFoldingHandler = function(title, content, funct)
{
var initialized = false;
// Avoids mixed content warning in IE6-8
if (!mxClient.IS_IE || document.documentMode >= 8)
{
title.style.backgroundImage = (content.style.display == 'none') ?
'url(\'' + this.collapsedImage + '\')' : 'url(\'' + this.expandedImage + '\')';
}
title.style.backgroundImage = (content.style.display == 'none') ?
'url(\'' + this.collapsedImage + '\')' : 'url(\'' + this.expandedImage + '\')';
title.style.backgroundRepeat = 'no-repeat';
title.style.backgroundPosition = '0% 50%';

View File

@ -65,11 +65,6 @@
{
container.style.background = '-moz-linear-gradient(top, #FFFFFF, #E7E7E7)';
}
else if (mxClient.IS_IE)
{
container.style.filter = 'progid:DXImageTransform.Microsoft.Gradient('+
'StartColorStr=\'#FFFFFF\', EndColorStr=\'#E7E7E7\', GradientType=0)';
}
document.body.appendChild(container);

View File

@ -414,12 +414,7 @@
background.style.background = 'black';
mxUtils.setOpacity(background, 50);
document.body.appendChild(background);
if (mxClient.IS_IE)
{
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

@ -65,8 +65,7 @@
// Condition to avoid scrollbar events starting a rubberband
// selection
else if (this.isContainerEvent(evt) &&
((!mxClient.IS_IE &&
!mxClient.IS_GC && !mxClient.IS_OP && !mxClient.IS_SF) ||
((!mxClient.IS_GC && !mxClient.IS_SF) ||
!this.isScrollEvent(evt)))
{
graph.fireMouseEvent(mxEvent.MOUSE_DOWN,
@ -222,27 +221,6 @@
{
var image =new Image();
// Disable DnD events on images in IE. FIXME: Rubberband
// events are ignored in IE when starting on the image.
if (mxClient.IS_IE)
{
graph.view.isContainerEvent = function(evt)
{
var source = mxEvent.getSource(evt);
return (source == image ||
source == this.graph.container ||
source.parentNode == this.backgroundPane ||
(source.parentNode != null &&
source.parentNode.parentNode == this.backgroundPane) ||
source == this.canvas.parentNode ||
source == this.canvas ||
source == this.backgroundPane ||
source == this.drawPane ||
source == this.overlayPane);
};
}
// Less flickering if the old image is removed after
// the new image was received from the server
image.onload = function()

View File

@ -74,15 +74,7 @@
container.onselectstart = textEditing;
container.onmousedown = textEditing;
if (mxClient.IS_IE && (typeof(document.documentMode) === 'undefined' || document.documentMode < 9))
{
mxEvent.addListener(container, 'contextmenu', textEditing);
}
else
{
container.oncontextmenu = textEditing;
}
container.oncontextmenu = textEditing;
// Creates the graph inside the given container
var graph = new mxGraph(container);

View File

@ -110,12 +110,7 @@
container.style.top = '0px';
container.style.right = '0px';
container.style.bottom = '0px';
if (mxClient.IS_IE)
{
new mxDivResizer(container);
}
document.body.appendChild(container);
// Creates the graph inside the given container

View File

@ -298,20 +298,13 @@
}
});
if (mxClient.IS_IE)
{
mxEvent.addListener(input, 'focusout', applyHandler);
}
else
{
// Note: Known problem is the blurring of fields in
// Firefox by changing the selection, in which case
// no event is fired in FF and the change is lost.
// As a workaround you should use a local variable
// that stores the focused field and invoke blur
// explicitely where we do the graph.focus above.
mxEvent.addListener(input, 'blur', applyHandler);
}
// Note: Known problem is the blurring of fields in
// Firefox by changing the selection, in which case
// no event is fired in FF and the change is lost.
// As a workaround you should use a local variable
// that stores the focused field and invoke blur
// explicitely where we do the graph.focus above.
mxEvent.addListener(input, 'blur', applyHandler);
}
};
</script>

View File

@ -483,12 +483,6 @@ class mxDefaultToolbar {
sprite);
mxEvent.removeListener(sprite, 'load', loader);
});
if (mxClient.IS_IE) {
loader();
} else {
mxEvent.addListener(sprite, 'load', loader);
}
};
/**

View File

@ -396,13 +396,6 @@ class mxEditor extends mxEventSource {
// Invokes the <onInit> hook
this.onInit();
}
// Automatic deallocation of memory
if (mxClient.IS_IE) {
mxEvent.addListener(window, 'unload', mxUtils.bind(this, ()=>{
this.destroy();
}));
}
}
};
@ -417,7 +410,7 @@ class mxEditor extends mxEventSource {
* key does not exist then the value is used as the error message. Default
* is 'askZoom'.
*/
askZoomResource = (mxClient.language != 'none') ? 'askZoom' : '';
askZoomResource = (mxClient.language !== 'none') ? 'askZoom' : '';
/**
* Variable: lastSavedResource
@ -426,7 +419,7 @@ class mxEditor extends mxEventSource {
* this key does not exist then the value is used as the error message.
* Default is 'lastSaved'.
*/
lastSavedResource = (mxClient.language != 'none') ? 'lastSaved' : '';
lastSavedResource = (mxClient.language !== 'none') ? 'lastSaved' : '';
/**
* Variable: currentFileResource
@ -435,7 +428,7 @@ class mxEditor extends mxEventSource {
* this key does not exist then the value is used as the error message.
* Default is 'currentFile'.
*/
currentFileResource = (mxClient.language != 'none') ? 'currentFile' : '';
currentFileResource = (mxClient.language !== 'none') ? 'currentFile' : '';
/**
* Variable: propertiesResource
@ -444,7 +437,7 @@ class mxEditor extends mxEventSource {
* resource for this key does not exist then the value is used as the
* error message. Default is 'properties'.
*/
propertiesResource = (mxClient.language != 'none') ? 'properties' : '';
propertiesResource = (mxClient.language !== 'none') ? 'properties' : '';
/**
* Variable: tasksResource
@ -453,7 +446,7 @@ class mxEditor extends mxEventSource {
* resource for this key does not exist then the value is used as the
* error message. Default is 'tasks'.
*/
tasksResource = (mxClient.language != 'none') ? 'tasks' : '';
tasksResource = (mxClient.language !== 'none') ? 'tasks' : '';
/**
* Variable: helpResource
@ -462,7 +455,7 @@ class mxEditor extends mxEventSource {
* resource for this key does not exist then the value is used as the
* error message. Default is 'help'.
*/
helpResource = (mxClient.language != 'none') ? 'help' : '';
helpResource = (mxClient.language !== 'none') ? 'help' : '';
/**
* Variable: outlineResource
@ -471,7 +464,7 @@ class mxEditor extends mxEventSource {
* resource for this key does not exist then the value is used as the
* error message. Default is 'outline'.
*/
outlineResource = (mxClient.language != 'none') ? 'outline' : '';
outlineResource = (mxClient.language !== 'none') ? 'outline' : '';
/**
* Variable: outline

View File

@ -82,15 +82,6 @@ function mxCellTracker(graph, color, funct)
{
this.getCell = funct;
}
// Automatic deallocation of memory
if (mxClient.IS_IE)
{
mxEvent.addListener(window, 'unload', mxUtils.bind(this, ()=>
{
this.destroy();
}));
}
};
/**

View File

@ -788,7 +788,7 @@ getHandleForEvent = (me)=>
{
// Connection highlight may consume events before they reach sizer handle
var tol = (!mxEvent.isMouseEvent(me.getEvent())) ? this.tolerance : 1;
var hit = (this.allowHandleBoundsCheck && (mxClient.IS_IE || tol > 0)) ?
var hit = (this.allowHandleBoundsCheck && tol > 0) ?
new mxRectangle(me.getGraphX() - tol, me.getGraphY() - tol, 2 * tol, 2 * tol) : null;
var minDistSq = null;
@ -1537,11 +1537,6 @@ mouseMove = (sender, me)=>
mxEvent.consume(me.getEvent());
me.consume();
}
// Workaround for disabling the connect highlight when over handle
else if (mxClient.IS_IE && this.getHandleForEvent(me) != null)
{
me.consume(false);
}
};
/**

View File

@ -139,7 +139,7 @@ graph = null;
* cells in the graph is limited to a small number, eg.
* 500.
*/
maxCells = (mxClient.IS_IE) ? 20 : 50;
maxCells = 50;
/**
* Variable: enabled

View File

@ -83,17 +83,6 @@ function mxKeyHandler(graph, target)
// Installs the keystroke listener in the target
mxEvent.addListener(this.target, 'keydown', this.keydownHandler);
// Automatically deallocates memory in IE
if (mxClient.IS_IE)
{
mxEvent.addListener(window, 'unload',
mxUtils.bind(this, ()=>
{
this.destroy();
})
);
}
}
};

View File

@ -63,17 +63,6 @@ function mxRubberband(graph)
});
this.graph.addListener(mxEvent.GESTURE, this.gestureHandler);
// Automatic deallocation of memory
if (mxClient.IS_IE)
{
mxEvent.addListener(window, 'unload',
mxUtils.bind(this, ()=>
{
this.destroy();
})
);
}
}
};
@ -279,7 +268,7 @@ createShape = ()=>
this.graph.container.appendChild(this.sharedDiv);
var result = this.sharedDiv;
if (mxClient.IS_SVG && (!mxClient.IS_IE || document.documentMode >= 10) && this.fadeOut)
if (mxClient.IS_SVG && this.fadeOut)
{
this.sharedDiv = null;
}
@ -336,7 +325,7 @@ reset = ()=>
{
if (this.div != null)
{
if (mxClient.IS_SVG && (!mxClient.IS_IE || document.documentMode >= 10) && this.fadeOut)
if (mxClient.IS_SVG && this.fadeOut)
{
var temp = this.div;
mxUtils.setPrefixedStyle(temp.style, 'transition', 'all 0.2s linear');

View File

@ -525,7 +525,7 @@ getHandleForEvent = (me)=>
{
// Connection highlight may consume events before they reach sizer handle
var tol = (!mxEvent.isMouseEvent(me.getEvent())) ? this.tolerance : 1;
var hit = (this.allowHandleBoundsCheck && (mxClient.IS_IE || tol > 0)) ?
var hit = (this.allowHandleBoundsCheck && tol > 0) ?
new mxRectangle(me.getGraphX() - tol, me.getGraphY() - tol, 2 * tol, 2 * tol) : null;
var checkShape = mxUtils.bind(this, (shape)=>

View File

@ -2,8 +2,7 @@
* Copyright (c) 2006-2017, JGraph Ltd
* Copyright (c) 2006-2017, Gaudenz Alder
*/
var mxClient =
{
var mxClient = {
/**
* Class: mxClient
*
@ -12,26 +11,18 @@ var mxClient =
* well as global constants to identify the browser and operating system in
* use. You may have to load chrome://global/content/contentAreaUtils.js in
* your page to disable certain security restrictions in Mozilla.
*
*
* Variable: VERSION
*
* Contains the current version of the mxGraph library. The strings that
* communicate versions of mxGraph use the following format.
*
*
* versionMajor.versionMinor.buildNumber.revisionNumber
*
*
* Current version is 4.2.2.
*/
VERSION: '4.2.2',
/**
* Variable: IS_IE
*
* True if the current browser is Internet Explorer 10 or below. Use <mxClient.IS_IE11>
* to detect IE 11.
*/
IS_IE: navigator.userAgent != null && navigator.userAgent.indexOf('MSIE') >= 0,
/**
* Variable: IS_IE6
*
@ -39,13 +30,6 @@ var mxClient =
*/
IS_IE6: navigator.userAgent != null && navigator.userAgent.indexOf('MSIE 6') >= 0,
/**
* Variable: IS_IE11
*
* True if the current browser is Internet Explorer 11.x.
*/
IS_IE11: navigator.userAgent != null && !!navigator.userAgent.match(/Trident\/7\./),
/**
* Variable: IS_EDGE
*
@ -59,25 +43,25 @@ var mxClient =
* True if the current browser is Internet Explorer and it is in quirks mode.
*/
IS_QUIRKS: navigator.userAgent != null && navigator.userAgent.indexOf('MSIE') >= 0 &&
(document.documentMode == null || document.documentMode == 5),
(document.documentMode == null || document.documentMode == 5),
/**
* Variable: IS_EM
*
*
* True if the browser is IE11 in enterprise mode (IE8 standards mode).
*/
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',
@ -87,77 +71,53 @@ var mxClient =
*
* True if the current browser is Netscape (including Firefox).
*/
IS_NS: navigator.userAgent != null &&
IS_NS: navigator.userAgent != null &&
navigator.userAgent.indexOf('Mozilla/') >= 0 &&
navigator.userAgent.indexOf('MSIE') < 0 &&
navigator.userAgent.indexOf('Edge/') < 0,
/**
* Variable: IS_OP
*
* True if the current browser is Opera.
*/
IS_OP: navigator.userAgent != null &&
(navigator.userAgent.indexOf('Opera/') >= 0 ||
navigator.userAgent.indexOf('OPR/') >= 0),
/**
* Variable: IS_OT
*
* True if -o-transform is available as a CSS style, ie for Opera browsers
* based on a Presto engine with version 2.5 or later.
*/
IS_OT: navigator.userAgent != null &&
navigator.userAgent.indexOf('Presto/') >= 0 &&
navigator.userAgent.indexOf('Presto/2.4.') < 0 &&
navigator.userAgent.indexOf('Presto/2.3.') < 0 &&
navigator.userAgent.indexOf('Presto/2.2.') < 0 &&
navigator.userAgent.indexOf('Presto/2.1.') < 0 &&
navigator.userAgent.indexOf('Presto/2.0.') < 0 &&
navigator.userAgent.indexOf('Presto/1.') < 0,
/**
* Variable: IS_SF
*
* True if the current browser is Safari.
*/
IS_SF: /Apple Computer, Inc/.test(navigator.vendor),
IS_SF: /Apple Computer, Inc/.test(navigator.vendor),
/**
* Variable: IS_ANDROID
*
*
* Returns true if the user agent contains Android.
*/
IS_ANDROID: navigator.appVersion.indexOf('Android') >= 0,
IS_ANDROID: navigator.appVersion.indexOf('Android') >= 0,
/**
* Variable: IS_IOS
*
*
* Returns true if the user agent is an iPad, iPhone or iPod.
*/
IS_IOS: (/iP(hone|od|ad)/.test(navigator.platform)),
IS_IOS: (/iP(hone|od|ad)/.test(navigator.platform)),
/**
* Variable: IS_GC
*
* True if the current browser is Google Chrome.
*/
IS_GC: /Google Inc/.test(navigator.vendor),
IS_GC: /Google Inc/.test(navigator.vendor),
/**
* Variable: IS_CHROMEAPP
*
* True if the this is running inside a Chrome App.
*/
IS_CHROMEAPP: window.chrome != null && chrome.app != null && chrome.app.runtime != null,
IS_CHROMEAPP: window.chrome != null && chrome.app != null && chrome.app.runtime != null,
/**
* Variable: IS_FF
*
* True if the current browser is Firefox.
*/
IS_FF: typeof InstallTrigger !== 'undefined',
IS_FF: typeof InstallTrigger !== 'undefined',
/**
* Variable: IS_MT
*
@ -165,30 +125,30 @@ var mxClient =
* for all Firefox-based browsers newer than or equal 3, such as Camino,
* Iceweasel, Seamonkey and Iceape.
*/
IS_MT: (navigator.userAgent.indexOf('Firefox/') >= 0 &&
navigator.userAgent.indexOf('Firefox/1.') < 0 &&
IS_MT: (navigator.userAgent.indexOf('Firefox/') >= 0 &&
navigator.userAgent.indexOf('Firefox/1.') < 0 &&
navigator.userAgent.indexOf('Firefox/2.') < 0) ||
(navigator.userAgent.indexOf('Iceweasel/') >= 0 &&
navigator.userAgent.indexOf('Iceweasel/1.') < 0 &&
navigator.userAgent.indexOf('Iceweasel/2.') < 0) ||
navigator.userAgent.indexOf('Iceweasel/1.') < 0 &&
navigator.userAgent.indexOf('Iceweasel/2.') < 0) ||
(navigator.userAgent.indexOf('SeaMonkey/') >= 0 &&
navigator.userAgent.indexOf('SeaMonkey/1.') < 0) ||
navigator.userAgent.indexOf('SeaMonkey/1.') < 0) ||
(navigator.userAgent.indexOf('Iceape/') >= 0 &&
navigator.userAgent.indexOf('Iceape/1.') < 0),
navigator.userAgent.indexOf('Iceape/1.') < 0),
/**
* Variable: IS_VML
*
* True if the browser supports VML.
*/
IS_VML: navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER',
IS_VML: navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER',
/**
* Variable: IS_SVG
*
* True if the browser supports SVG.
*/
IS_SVG: navigator.appName.toUpperCase() != 'MICROSOFT INTERNET EXPLORER',
IS_SVG: navigator.appName.toUpperCase() != 'MICROSOFT INTERNET EXPLORER',
/**
* Variable: NO_FO
@ -196,7 +156,7 @@ var mxClient =
* True if foreignObject support is not available. This is the case for
* Opera, older SVG-based browsers and all versions of IE.
*/
NO_FO: !document.createElementNS || document.createElementNS('http://www.w3.org/2000/svg',
NO_FO: !document.createElementNS || document.createElementNS('http://www.w3.org/2000/svg',
'foreignObject') != '[object SVGForeignObjectElement]' || navigator.userAgent.indexOf('Opera/') >= 0,
/**
@ -204,60 +164,60 @@ var mxClient =
*
* True if the client is a Windows.
*/
IS_WIN: navigator.appVersion.indexOf('Win') > 0,
IS_WIN: navigator.appVersion.indexOf('Win') > 0,
/**
* Variable: IS_MAC
*
* True if the client is a Mac.
*/
IS_MAC: navigator.appVersion.indexOf('Mac') > 0,
IS_MAC: navigator.appVersion.indexOf('Mac') > 0,
/**
* Variable: IS_CHROMEOS
*
* True if the client is a Chrome OS.
*/
IS_CHROMEOS: /\bCrOS\b/.test(navigator.appVersion),
IS_CHROMEOS: /\bCrOS\b/.test(navigator.appVersion),
/**
* Variable: IS_TOUCH
*
*
* True if this device supports touchstart/-move/-end events (Apple iOS,
* Android, Chromebook and Chrome Browser on touch-enabled devices).
*/
IS_TOUCH: 'ontouchstart' in document.documentElement,
IS_TOUCH: 'ontouchstart' in document.documentElement,
/**
* Variable: IS_POINTER
*
*
* True if this device supports Microsoft pointer events (always false on Macs).
*/
IS_POINTER: window.PointerEvent != null && !(navigator.appVersion.indexOf('Mac') > 0),
IS_POINTER: window.PointerEvent != null && !(navigator.appVersion.indexOf('Mac') > 0),
/**
* Variable: IS_LOCAL
*
* True if the documents location does not start with http:// or https://.
*/
IS_LOCAL: document.location.href.indexOf('http://') < 0 &&
document.location.href.indexOf('https://') < 0,
IS_LOCAL: document.location.href.indexOf('http://') < 0 &&
document.location.href.indexOf('https://') < 0,
/**
* Variable: defaultBundles
*
*
* Contains the base names of the default bundles if mxLoadResources is false.
*/
defaultBundles: [],
defaultBundles: [],
/**
* Function: isBrowserSupported
*
* Returns true if the current browser is supported, that is, if
* <mxClient.IS_VML> or <mxClient.IS_SVG> is true.
*
*
* Example:
*
*
* (code)
* if (!mxClient.isBrowserSupported())
* {
@ -265,9 +225,8 @@ var mxClient =
* }
* (end)
*/
isBrowserSupported: ()=>
{
return mxClient.IS_VML || mxClient.IS_SVG;
isBrowserSupported: () => {
return mxClient.IS_SVG;
},
/**
@ -282,83 +241,73 @@ var mxClient =
*
* where filename is the (relative) URL of the stylesheet. The charset
* is hardcoded to ISO-8859-1 and the type is text/css.
*
*
* Parameters:
*
*
* rel - String that represents the rel attribute of the link node.
* href - String that represents the href attribute of the link node.
* doc - Optional parent document of the link node.
* id - unique id for the link element to check if it already exists
*/
link: (rel, href, doc, id)=>
{
link: (rel, href, doc, id) => {
doc = doc || document;
// Workaround for Operation Aborted in IE6 if base tag is used in head
if (mxClient.IS_IE6)
{
if (mxClient.IS_IE6) {
doc.write('<link rel="' + rel + '" href="' + href + '" charset="UTF-8" type="text/css"/>');
}
else
{
} else {
var link = doc.createElement('link');
link.setAttribute('rel', rel);
link.setAttribute('href', href);
link.setAttribute('charset', 'UTF-8');
link.setAttribute('type', 'text/css');
if (id)
{
if (id) {
link.setAttribute('id', id);
}
var head = doc.getElementsByTagName('head')[0];
head.appendChild(link);
head.appendChild(link);
}
},
/**
* Function: loadResources
*
*
* Helper method to load the default bundles if mxLoadResources is false.
*
*
* Parameters:
*
*
* fn - Function to call after all resources have been loaded.
* lan - Optional string to pass to <mxResources.add>.
*/
loadResources: (fn, lan)=>
{
loadResources: (fn, lan) => {
var pending = mxClient.defaultBundles.length;
function callback()
{
if (--pending == 0)
{
function callback() {
if (--pending == 0) {
fn();
}
}
for (var i = 0; i < mxClient.defaultBundles.length; i++)
{
for (var i = 0; i < mxClient.defaultBundles.length; i++) {
mxResources.add(mxClient.defaultBundles[i], lan, callback);
}
},
/**
* Function: include
*
* Dynamically adds a script node to the document header.
*
*
* In production environments, the includes are resolved in the mxClient.js
* file to reduce the number of requests required for client startup. This
* function should only be used in development environments, but not in
* production systems.
*/
include: (src)=>
{
document.write('<script src="'+src+'"></script>');
include: (src) => {
document.write('<script src="' + src + '"></script>');
}
};
@ -377,8 +326,7 @@ var mxClient =
* <script type="text/javascript" src="/path/to/core/directory/js/mxClient.js"></script>
* (end)
*/
if (typeof(mxLoadResources) == 'undefined')
{
if (typeof(mxLoadResources) == 'undefined') {
mxLoadResources = true;
}
@ -396,8 +344,7 @@ if (typeof(mxLoadResources) == 'undefined')
* <script type="text/javascript" src="/path/to/core/directory/js/mxClient.js"></script>
* (end)
*/
if (typeof(mxForceIncludes) == 'undefined')
{
if (typeof(mxForceIncludes) == 'undefined') {
mxForceIncludes = false;
}
@ -414,8 +361,7 @@ if (typeof(mxForceIncludes) == 'undefined')
* <script type="text/javascript" src="/path/to/core/directory/js/mxClient.js"></script>
* (end)
*/
if (typeof(mxResourceExtension) == 'undefined')
{
if (typeof(mxResourceExtension) == 'undefined') {
mxResourceExtension = '.txt';
}
@ -433,8 +379,7 @@ if (typeof(mxResourceExtension) == 'undefined')
* <script type="text/javascript" src="/path/to/core/directory/js/mxClient.js"></script>
* (end)
*/
if (typeof(mxLoadStylesheets) == 'undefined')
{
if (typeof(mxLoadStylesheets) == 'undefined') {
mxLoadStylesheets = true;
}
@ -455,18 +400,15 @@ if (typeof(mxLoadStylesheets) == 'undefined')
* When using a relative path, the path is relative to the URL of the page that
* contains the assignment. Trailing slashes are automatically removed.
*/
if (typeof(mxBasePath) != 'undefined' && mxBasePath.length > 0)
{
if (typeof(mxBasePath) != 'undefined' && mxBasePath.length > 0) {
// Adds a trailing slash if required
if (mxBasePath.substring(mxBasePath.length - 1) == '/')
{
if (mxBasePath.substring(mxBasePath.length - 1) == '/') {
mxBasePath = mxBasePath.substring(0, mxBasePath.length - 1);
}
mxClient.basePath = mxBasePath;
}
else
{
else {
mxClient.basePath = '.';
}
@ -487,19 +429,16 @@ else
* When using a relative path, the path is relative to the URL of the page that
* contains the assignment. Trailing slashes are automatically removed.
*/
if (typeof(mxImageBasePath) != 'undefined' && mxImageBasePath.length > 0)
{
if (typeof(mxImageBasePath) != 'undefined' && mxImageBasePath.length > 0) {
// Adds a trailing slash if required
if (mxImageBasePath.substring(mxImageBasePath.length - 1) == '/')
{
if (mxImageBasePath.substring(mxImageBasePath.length - 1) == '/') {
mxImageBasePath = mxImageBasePath.substring(0, mxImageBasePath.length - 1);
}
mxClient.imageBasePath = mxImageBasePath;
}
else
{
mxClient.imageBasePath = mxClient.basePath + '/images';
else {
mxClient.imageBasePath = mxClient.basePath + '/images';
}
/**
@ -533,13 +472,11 @@ else
* <mxGraph.containsValidationErrorsResource> and
* <mxGraph.alreadyConnectedResource>.
*/
if (typeof(mxLanguage) != 'undefined' && mxLanguage != null)
{
if (typeof(mxLanguage) != 'undefined' && mxLanguage != null) {
mxClient.language = mxLanguage;
}
else
{
mxClient.language = (mxClient.IS_IE) ? navigator.userLanguage : navigator.language;
else {
mxClient.language = navigator.language;
}
/**
@ -559,18 +496,15 @@ else
* <script type="text/javascript" src="js/mxClient.js"></script>
* (end)
*/
if (typeof(mxDefaultLanguage) != 'undefined' && mxDefaultLanguage != null)
{
if (typeof(mxDefaultLanguage) != 'undefined' && mxDefaultLanguage != null) {
mxClient.defaultLanguage = mxDefaultLanguage;
}
else
{
else {
mxClient.defaultLanguage = 'en';
}
// Adds all required stylesheets and namespaces
if (mxLoadStylesheets)
{
if (mxLoadStylesheets) {
mxClient.link('stylesheet', mxClient.basePath + '/css/common.css');
}
@ -591,58 +525,44 @@ if (mxLoadStylesheets)
* This is used to avoid unnecessary requests to language files, ie. if a 404
* will be returned.
*/
if (typeof(mxLanguages) != 'undefined' && mxLanguages != null)
{
if (typeof(mxLanguages) != 'undefined' && mxLanguages != null) {
mxClient.languages = mxLanguages;
}
// Adds required namespaces, stylesheets and memory handling for older IE browsers
if (mxClient.IS_VML)
{
if (mxClient.IS_SVG)
{
if (mxClient.IS_VML) {
if (mxClient.IS_SVG) {
mxClient.IS_VML = false;
}
else
{
} else {
// Enables support for IE8 standards mode. Note that this requires all attributes for VML
// elements to be set using direct notation, ie. node.attr = value, not setAttribute.
if (document.namespaces != null)
{
if (document.documentMode == 8)
{
if (document.namespaces != null) {
if (document.documentMode == 8) {
document.namespaces.add(mxClient.VML_PREFIX, 'urn:schemas-microsoft-com:vml', '#default#VML');
document.namespaces.add(mxClient.OFFICE_PREFIX, 'urn:schemas-microsoft-com:office:office', '#default#VML');
}
else
{
} else {
document.namespaces.add(mxClient.VML_PREFIX, 'urn:schemas-microsoft-com:vml');
document.namespaces.add(mxClient.OFFICE_PREFIX, 'urn:schemas-microsoft-com:office:office');
}
}
// Workaround for limited number of stylesheets in IE (does not work in standards mode)
if (mxClient.IS_QUIRKS && document.styleSheets.length >= 30)
{
(()=>
{
if (mxClient.IS_QUIRKS && document.styleSheets.length >= 30) {
(() => {
var node = document.createElement('style');
node.type = 'text/css';
node.styleSheet.cssText = mxClient.VML_PREFIX + '\\:*{behavior:url(#default#VML)}' +
mxClient.OFFICE_PREFIX + '\\:*{behavior:url(#default#VML)}';
document.getElementsByTagName('head')[0].appendChild(node);
mxClient.OFFICE_PREFIX + '\\:*{behavior:url(#default#VML)}';
document.getElementsByTagName('head')[0].appendChild(node);
})();
}
else
{
} else {
document.createStyleSheet().cssText = mxClient.VML_PREFIX + '\\:*{behavior:url(#default#VML)}' +
mxClient.OFFICE_PREFIX + '\\:*{behavior:url(#default#VML)}';
}
if (mxLoadStylesheets)
{
mxClient.link('stylesheet', mxClient.basePath + '/css/explorer.css');
}
if (mxLoadStylesheets) {
mxClient.link('stylesheet', mxClient.basePath + '/css/explorer.css');
}
}
}

View File

@ -283,11 +283,7 @@ class mxText extends mxShape {
} else {
this.updateSize(this.node, (this.state == null || this.state.view.textDiv == null));
if (mxClient.IS_IE && (document.documentMode == null || document.documentMode <= 8)) {
this.updateHtmlFilter();
} else {
this.updateHtmlTransform();
}
this.updateHtmlTransform();
}
this.updateBoundingBox();
@ -697,11 +693,7 @@ class mxText extends mxShape {
this.offsetWidth = null;
this.offsetHeight = null;
if (mxClient.IS_IE && (document.documentMode == null || document.documentMode <= 8)) {
this.updateHtmlFilter();
} else {
this.updateHtmlTransform();
}
this.updateHtmlTransform();
}
};

View File

@ -470,7 +470,7 @@
* Defines the strokewidth to be used for the outline rectangle
* stroke width. Default is 3.
*/
OUTLINE_STROKEWIDTH: (mxClient.IS_IE) ? 2 : 3,
OUTLINE_STROKEWIDTH: 3,
/**
* Variable: HANDLE_SIZE

View File

@ -179,7 +179,7 @@ var mxLog =
mxLog.window.destroyOnClose = false;
// Workaround for ignored textarea height in various setups
if (((mxClient.IS_NS || mxClient.IS_IE) && !mxClient.IS_GC &&
if ((mxClient.IS_NS && !mxClient.IS_GC &&
!mxClient.IS_SF && document.compatMode != 'BackCompat') ||
document.documentMode == 11)
{

View File

@ -233,13 +233,6 @@ consume = (preventDefault)=>
this.evt.preventDefault();
}
// Workaround for images being dragged in IE
// Does not change returnValue in Opera
if (mxClient.IS_IE)
{
this.evt.returnValue = true;
}
// Sets local consumed state
this.consumed = true;
};

View File

@ -437,7 +437,7 @@ showSubmenu = (parent, row)=>
if (left + width > right)
{
row.div.style.left = Math.max(0, (parent.div.offsetLeft - width + ((mxClient.IS_IE) ? 6 : -6))) + 'px';
row.div.style.left = Math.max(0, (parent.div.offsetLeft - width-6)) + 'px';
}
mxUtils.fit(row.div);

View File

@ -145,7 +145,7 @@ mxUtils.extend(mxSvgCanvas2D, mxAbstractCanvas2D);
*/
(()=>
{
mxSvgCanvas2useDomParser = !mxClient.IS_IE && typeof DOMParser === 'function' && typeof XMLSerializer === 'function';
mxSvgCanvas2useDomParser = typeof DOMParser === 'function' && typeof XMLSerializer === 'function';
if (mxSvgCanvas2useDomParser)
{
@ -163,7 +163,7 @@ mxUtils.extend(mxSvgCanvas2D, mxAbstractCanvas2D);
}
// Activates workaround for gradient ID resolution if base tag is used.
mxSvgCanvas2useAbsoluteIds = !mxClient.IS_CHROMEAPP && !mxClient.IS_IE && !mxClient.IS_IE11 &&
mxSvgCanvas2useAbsoluteIds = !mxClient.IS_CHROMEAPP &&
!mxClient.IS_EDGE && document.getElementsByTagName('base').length > 0;
})();
@ -847,13 +847,7 @@ mxSvgCanvas2createTolerance = (node)=>
tol.removeAttribute('stroke-dasharray');
tol.setAttribute('stroke-width', sw);
tol.setAttribute('fill', 'none');
// Workaround for Opera ignoring the visiblity attribute above while
// other browsers need a stroke color to perform the hit-detection but
// do not ignore the visibility attribute. Side-effect is that Opera's
// hit detection for horizontal/vertical edges seems to ignore the tol.
tol.setAttribute('stroke', (mxClient.IS_OT) ? 'none' : 'white');
tol.setAttribute('stroke', 'white');
return tol;
};
@ -1198,8 +1192,7 @@ mxSvgCanvas2createDiv = (str)=>
val = '<div><div>' + this.convertHtml(val) + '</div></div>';
}
// IE uses this code for export as it cannot render foreignObjects
if (!mxClient.IS_IE && !mxClient.IS_IE11 && document.createElementNS)
if (document.createElementNS)
{
var div = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');
@ -1654,8 +1647,7 @@ mxSvgCanvas2plainText = (x, y, w, h, str, align, valign, wrap, overflow, clip, r
this.root.appendChild(c);
}
if (!mxClient.IS_CHROMEAPP && !mxClient.IS_IE && !mxClient.IS_IE11 &&
!mxClient.IS_EDGE && this.root.ownerDocument == document)
if (!mxClient.IS_CHROMEAPP && !mxClient.IS_EDGE && this.root.ownerDocument == document)
{
// Workaround for potential base tag
var base = this.getBaseUrl().replace(/([\(\)])/g, '\\$1');
@ -1831,8 +1823,7 @@ mxSvgCanvas2addTextBackground = (node, str, x, y, w, h, align, valign, overflow)
try
{
bbox = node.getBBox();
var ie = mxClient.IS_IE && mxClient.IS_SVG;
bbox = new mxRectangle(bbox.x, bbox.y + ((ie) ? 0 : 1), bbox.width, bbox.height + ((ie) ? 1 : 0));
bbox = new mxRectangle(bbox.x, bbox.y + 1, bbox.width, bbox.height + 0);
}
catch (e)
{

File diff suppressed because it is too large Load Diff

View File

@ -235,7 +235,7 @@ minResize = new mxRectangle(0, 20);
* Correction factor for word wrapping width. Default is 2 in quirks, 0 in IE
* 11 and 1 in all other browsers and modes.
*/
wordWrapPadding = (mxClient.IS_QUIRKS) ? 2 : (!mxClient.IS_IE11) ? 1 : 0;
wordWrapPadding = 0;
/**
* Variable: blurEnabled
@ -430,12 +430,12 @@ installListeners = (elt)=>
}
});
mxEvent.addListener(elt, (!mxClient.IS_IE11 && !mxClient.IS_IE) ? 'input' : 'keyup', keyupHandler);
mxEvent.addListener(elt, 'input', keyupHandler);
mxEvent.addListener(elt, 'cut', keyupHandler);
mxEvent.addListener(elt, 'paste', keyupHandler);
// Adds automatic resizing of the textbox while typing using input, keyup and/or DOM change events
var evtName = (!mxClient.IS_IE11 && !mxClient.IS_IE) ? 'input' : 'keydown';
var evtName = 'input';
var resizeHandler = mxUtils.bind(this, (evt)=>
{

View File

@ -1686,23 +1686,6 @@ init = (container)=>
}
}));
// Automatic deallocation of memory
if (mxClient.IS_IE)
{
mxEvent.addListener(window, 'unload', mxUtils.bind(this, ()=>
{
this.destroy();
}));
// Disable shift-click for text
mxEvent.addListener(container, 'selectstart',
mxUtils.bind(this, (evt)=>
{
return this.isEditing() || (!this.isMouseDown && !mxEvent.isShiftDown(evt));
})
);
}
// 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)
@ -3141,7 +3124,7 @@ sizeDidChange = ()=>
this.doResizeContainer(width, height);
}
if (this.preferPageSize || (!mxClient.IS_IE && this.pageVisible))
if (this.preferPageSize || this.pageVisible)
{
var size = this.getPreferredPageSize(bounds, Math.max(1, width), Math.max(1, height));
@ -7806,15 +7789,7 @@ panGraph = (dx, dy)=>
// can be moved without changing the state of the container
if (dx == 0 && dy == 0)
{
// Workaround for ignored removeAttribute on SVG element in IE9 standards
if (mxClient.IS_IE)
{
canvas.setAttribute('transform', 'translate(' + dx + ',' + dy + ')');
}
else
{
canvas.removeAttribute('transform');
}
canvas.removeAttribute('transform');
if (this.shiftPreview1 != null)
{
@ -13009,8 +12984,7 @@ fireMouseEvent = (evtName, me, sender)=>
me.state = this.getEventState(me.getState());
this.fireEvent(new mxEventObject(mxEvent.FIRE_MOUSE_EVENT, 'eventName', evtName, 'event', me));
if ((mxClient.IS_OP || mxClient.IS_SF || mxClient.IS_GC || mxClient.IS_IE11 ||
(mxClient.IS_IE && mxClient.IS_SVG) || me.getEvent().target != this.container))
if ((mxClient.IS_SF || mxClient.IS_GC || me.getEvent().target != this.container))
{
if (evtName == mxEvent.MOUSE_MOVE && this.isMouseDown && this.autoScroll && !mxEvent.isMultiTouchEvent(me.getEvent))
{

View File

@ -2590,8 +2590,7 @@ installListeners = ()=>
mxEvent.addGestureListeners(container, mxUtils.bind(this, (evt)=>
{
// Condition to avoid scrollbar events starting a rubberband selection
if (this.isContainerEvent(evt) && ((!mxClient.IS_IE && !mxClient.IS_IE11 && !mxClient.IS_GC &&
!mxClient.IS_OP && !mxClient.IS_SF) || !this.isScrollEvent(evt)))
if (this.isContainerEvent(evt) && ((!mxClient.IS_GC && !mxClient.IS_SF) || !this.isScrollEvent(evt)))
{
graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));
pointerId = evt.pointerId;
@ -2886,12 +2885,6 @@ createSvg = ()=>
// in order for the container DIV to not show scrollbars.
root.style.display = 'block';
root.appendChild(this.canvas);
// Workaround for scrollbars in IE11 and below
if (mxClient.IS_IE || mxClient.IS_IE11)
{
root.style.overflow = 'hidden';
}
if (container != null)
{

View File

@ -565,7 +565,7 @@ mouseDown = (sender, me)=>
if (this.enabled && this.showViewport)
{
var tol = (!mxEvent.isMouseEvent(me.getEvent())) ? this.source.tolerance : 0;
var hit = (this.source.allowHandleBoundsCheck && (mxClient.IS_IE || tol > 0)) ?
var hit = (this.source.allowHandleBoundsCheck && tol > 0) ?
new mxRectangle(me.getGraphX() - tol, me.getGraphY() - tol, 2 * tol, 2 * tol) : null;
this.zoom = me.isSource(this.sizer) || (hit != null && mxUtils.intersects(shape.bounds, hit));
this.startX = me.getX();

View File

@ -510,27 +510,6 @@ open = (css, targetWindow, forcePageBreaks, keepOpen)=>
{
var table = this.createPageSelector(vpages, hpages);
doc.body.appendChild(table);
// Implements position: fixed in IE quirks mode
if (mxClient.IS_IE && doc.documentMode == null || doc.documentMode == 5 || doc.documentMode == 8 || doc.documentMode == 7)
{
table.style.position = 'absolute';
var update = ()=>
{
table.style.top = ((doc.body.scrollTop || doc.documentElement.scrollTop) + 10) + 'px';
};
mxEvent.addListener(this.wnd, 'scroll', (evt)=>
{
update();
});
mxEvent.addListener(this.wnd, 'resize', (evt)=>
{
update();
});
}
}
});
@ -561,7 +540,7 @@ open = (css, targetWindow, forcePageBreaks, keepOpen)=>
// to create the complete page and then copy it over to the
// new window.document. This can be fixed later by using the
// ownerDocument of the container in mxShape and mxGraphView.
if (isNewWindow && (mxClient.IS_IE || document.documentMode >= 11 || mxClient.IS_EDGE))
if (isNewWindow && (document.documentMode >= 11 || mxClient.IS_EDGE))
{
// For some obscure reason, removing the DIV from the
// parent before fetching its outerHTML has missing
@ -570,7 +549,7 @@ open = (css, targetWindow, forcePageBreaks, keepOpen)=>
doc.writeln(div.outerHTML);
div.parentNode.removeChild(div);
}
else if (mxClient.IS_IE || document.documentMode >= 11 || mxClient.IS_EDGE)
else if (document.documentMode >= 11 || mxClient.IS_EDGE)
{
var clone = doc.createElement('div');
clone.innerHTML = div.outerHTML;
@ -896,17 +875,8 @@ renderPage = (w, h, dx, dy, content, pageNumber)=>
innerDiv.style.height = (h - 2 * this.border) + 'px';
innerDiv.style.overflow = 'hidden';
if (mxClient.IS_IE && (doc.documentMode == null || doc.documentMode == 5 ||
doc.documentMode == 8 || doc.documentMode == 7))
{
innerDiv.style.marginTop = this.border + 'px';
innerDiv.style.marginLeft = this.border + 'px';
}
else
{
innerDiv.style.top = this.border + 'px';
innerDiv.style.left = this.border + 'px';
}
innerDiv.style.top = this.border + 'px';
innerDiv.style.left = this.border + 'px';
if (this.graph.dialect == mxConstants.DIALECT_VML)
{
@ -1077,46 +1047,32 @@ addGraphFragment = (dx, dy, scale, pageNumber, div, clip)=>
}
finally
{
// Removes overlay pane with selection handles
// controls and icons from the print output
if (mxClient.IS_IE)
{
view.overlayPane.innerHTML = '';
view.canvas.style.overflow = 'hidden';
view.canvas.style.position = 'relative';
view.canvas.style.top = this.marginTop + 'px';
view.canvas.style.width = clip.width + 'px';
view.canvas.style.height = clip.height + 'px';
}
else
{
// Removes everything but the SVG node
var tmp = div.firstChild;
// Removes everything but the SVG node
var tmp = div.firstChild;
while (tmp != null)
while (tmp != null)
{
var next = tmp.nextSibling;
var name = tmp.nodeName.toLowerCase();
// Note: Width and height are required in FF 11
if (name == 'svg')
{
var next = tmp.nextSibling;
var name = tmp.nodeName.toLowerCase();
// Note: Width and height are required in FF 11
if (name == 'svg')
{
tmp.style.overflow = 'hidden';
tmp.style.position = 'relative';
tmp.style.top = this.marginTop + 'px';
tmp.setAttribute('width', clip.width);
tmp.setAttribute('height', clip.height);
tmp.style.width = '';
tmp.style.height = '';
}
// Tries to fetch all text labels and only text labels
else if (tmp.style.cursor != 'default' && name != 'div')
{
tmp.parentNode.removeChild(tmp);
}
tmp = next;
tmp.style.overflow = 'hidden';
tmp.style.position = 'relative';
tmp.style.top = this.marginTop + 'px';
tmp.setAttribute('width', clip.width);
tmp.setAttribute('height', clip.height);
tmp.style.width = '';
tmp.style.height = '';
}
// Tries to fetch all text labels and only text labels
else if (tmp.style.cursor != 'default' && name != 'div')
{
tmp.parentNode.removeChild(tmp);
}
tmp = next;
}
// Puts background image behind SVG output