Commit 290da6eb authored by Igor Kulikov's avatar Igor Kulikov

IE11 fixes.

parent c31c1112
...@@ -2057,11 +2057,18 @@ ...@@ -2057,11 +2057,18 @@
} }
else { else {
/** @type {?} */ /** @type {?} */
var target = (/** @type {?} */ (event.target)); var target_1 = (/** @type {?} */ (event.target));
this.destinationHtmlElements.push(target); /** @type {?} */
this.oldDisplayStyles.push(target.style.display); var cloneNode_1 = target_1.cloneNode(true);
target.style.display = 'none'; target_1.parentNode.insertBefore(cloneNode_1, target_1);
this.nodeDraggingScope.shadowDragStarted = true; target_1.style.visibility = 'collapse';
setTimeout((/**
* @return {?}
*/
function () {
target_1.parentNode.removeChild(cloneNode_1);
target_1.style.visibility = 'visible';
}), 0);
} }
return; return;
} }
...@@ -2096,12 +2103,29 @@ ...@@ -2096,12 +2103,29 @@
originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);
} }
else { else {
this.draggedElements.forEach((/**
* @param {?} draggedElement
* @return {?}
*/
function (draggedElement) {
/** @type {?} */
var cloneNode = draggedElement.cloneNode(true);
draggedElement.parentNode.insertBefore(cloneNode, draggedElement);
draggedElement.style.visibility = 'collapse';
setTimeout((/**
* @return {?}
*/
function () {
draggedElement.parentNode.removeChild(cloneNode);
draggedElement.style.visibility = 'visible';
}), 0);
}));
if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {
for (var i = 0; i < this.draggedElements.length; i++) { for (var i = 0; i < this.draggedElements.length; i++) {
this.destinationHtmlElements.push(this.draggedElements[i]); this.destinationHtmlElements.push(this.draggedElements[i]);
this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display); this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display);
this.destinationHtmlElements[i].style.display = 'none'; this.destinationHtmlElements[i].style.display = 'none';
} }
if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {
this.nodeDraggingScope.shadowDragStarted = true; this.nodeDraggingScope.shadowDragStarted = true;
} }
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1521,10 +1521,17 @@ class FcNodeDraggingService { ...@@ -1521,10 +1521,17 @@ class FcNodeDraggingService {
else { else {
/** @type {?} */ /** @type {?} */
const target = (/** @type {?} */ (event.target)); const target = (/** @type {?} */ (event.target));
this.destinationHtmlElements.push(target); /** @type {?} */
this.oldDisplayStyles.push(target.style.display); const cloneNode = target.cloneNode(true);
target.style.display = 'none'; target.parentNode.insertBefore(cloneNode, target);
this.nodeDraggingScope.shadowDragStarted = true; target.style.visibility = 'collapse';
setTimeout((/**
* @return {?}
*/
() => {
target.parentNode.removeChild(cloneNode);
target.style.visibility = 'visible';
}), 0);
} }
return; return;
} }
...@@ -1559,12 +1566,29 @@ class FcNodeDraggingService { ...@@ -1559,12 +1566,29 @@ class FcNodeDraggingService {
originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);
} }
else { else {
this.draggedElements.forEach((/**
* @param {?} draggedElement
* @return {?}
*/
(draggedElement) => {
/** @type {?} */
const cloneNode = draggedElement.cloneNode(true);
draggedElement.parentNode.insertBefore(cloneNode, draggedElement);
draggedElement.style.visibility = 'collapse';
setTimeout((/**
* @return {?}
*/
() => {
draggedElement.parentNode.removeChild(cloneNode);
draggedElement.style.visibility = 'visible';
}), 0);
}));
if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {
for (let i = 0; i < this.draggedElements.length; i++) { for (let i = 0; i < this.draggedElements.length; i++) {
this.destinationHtmlElements.push(this.draggedElements[i]); this.destinationHtmlElements.push(this.draggedElements[i]);
this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display); this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display);
this.destinationHtmlElements[i].style.display = 'none'; this.destinationHtmlElements[i].style.display = 'none';
} }
if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {
this.nodeDraggingScope.shadowDragStarted = true; this.nodeDraggingScope.shadowDragStarted = true;
} }
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1861,11 +1861,18 @@ var FcNodeDraggingService = /** @class */ (function () { ...@@ -1861,11 +1861,18 @@ var FcNodeDraggingService = /** @class */ (function () {
} }
else { else {
/** @type {?} */ /** @type {?} */
var target = (/** @type {?} */ (event.target)); var target_1 = (/** @type {?} */ (event.target));
this.destinationHtmlElements.push(target); /** @type {?} */
this.oldDisplayStyles.push(target.style.display); var cloneNode_1 = target_1.cloneNode(true);
target.style.display = 'none'; target_1.parentNode.insertBefore(cloneNode_1, target_1);
this.nodeDraggingScope.shadowDragStarted = true; target_1.style.visibility = 'collapse';
setTimeout((/**
* @return {?}
*/
function () {
target_1.parentNode.removeChild(cloneNode_1);
target_1.style.visibility = 'visible';
}), 0);
} }
return; return;
} }
...@@ -1900,12 +1907,29 @@ var FcNodeDraggingService = /** @class */ (function () { ...@@ -1900,12 +1907,29 @@ var FcNodeDraggingService = /** @class */ (function () {
originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);
} }
else { else {
this.draggedElements.forEach((/**
* @param {?} draggedElement
* @return {?}
*/
function (draggedElement) {
/** @type {?} */
var cloneNode = draggedElement.cloneNode(true);
draggedElement.parentNode.insertBefore(cloneNode, draggedElement);
draggedElement.style.visibility = 'collapse';
setTimeout((/**
* @return {?}
*/
function () {
draggedElement.parentNode.removeChild(cloneNode);
draggedElement.style.visibility = 'visible';
}), 0);
}));
if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {
for (var i = 0; i < this.draggedElements.length; i++) { for (var i = 0; i < this.draggedElements.length; i++) {
this.destinationHtmlElements.push(this.draggedElements[i]); this.destinationHtmlElements.push(this.draggedElements[i]);
this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display); this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display);
this.destinationHtmlElements[i].style.display = 'none'; this.destinationHtmlElements[i].style.display = 'none';
} }
if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {
this.nodeDraggingScope.shadowDragStarted = true; this.nodeDraggingScope.shadowDragStarted = true;
} }
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"version": "0.0.0", "version": "0.0.0",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve --open --port 4300", "start": "ng serve --host 0.0.0.0 --open --port 4300",
"build": "ng build ngx-flowchart --prod", "build": "ng build ngx-flowchart --prod",
"test": "ng test ngx-flowchart", "test": "ng test ngx-flowchart",
"lint": "ng lint", "lint": "ng lint",
......
...@@ -122,10 +122,13 @@ export class FcNodeDraggingService { ...@@ -122,10 +122,13 @@ export class FcNodeDraggingService {
originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);
} else { } else {
const target: HTMLElement = event.target as HTMLElement; const target: HTMLElement = event.target as HTMLElement;
this.destinationHtmlElements.push(target); const cloneNode = target.cloneNode(true);
this.oldDisplayStyles.push(target.style.display); target.parentNode.insertBefore(cloneNode, target);
target.style.display = 'none'; target.style.visibility = 'collapse';
this.nodeDraggingScope.shadowDragStarted = true; setTimeout(() => {
target.parentNode.removeChild(cloneNode);
target.style.visibility = 'visible';
}, 0);
} }
return; return;
} }
...@@ -158,12 +161,21 @@ export class FcNodeDraggingService { ...@@ -158,12 +161,21 @@ export class FcNodeDraggingService {
if (originalEvent.dataTransfer.setDragImage) { if (originalEvent.dataTransfer.setDragImage) {
originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);
} else { } else {
this.draggedElements.forEach((draggedElement) => {
const cloneNode = draggedElement.cloneNode(true);
draggedElement.parentNode.insertBefore(cloneNode, draggedElement);
draggedElement.style.visibility = 'collapse';
setTimeout(() => {
draggedElement.parentNode.removeChild(cloneNode);
draggedElement.style.visibility = 'visible';
}, 0);
});
if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {
for (let i = 0; i < this.draggedElements.length; i++) { for (let i = 0; i < this.draggedElements.length; i++) {
this.destinationHtmlElements.push(this.draggedElements[i]); this.destinationHtmlElements.push(this.draggedElements[i]);
this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display); this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display);
this.destinationHtmlElements[i].style.display = 'none'; this.destinationHtmlElements[i].style.display = 'none';
} }
if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {
this.nodeDraggingScope.shadowDragStarted = true; this.nodeDraggingScope.shadowDragStarted = true;
} }
} }
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
* Zone JS is required by default for Angular itself. * Zone JS is required by default for Angular itself.
*/ */
import 'zone.js/dist/zone'; // Included with Angular CLI. import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'core-js/es/array';
/*************************************************************************************************** /***************************************************************************************************
* APPLICATION IMPORTS * APPLICATION IMPORTS
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"importHelpers": true, "importHelpers": true,
"target": "es2015", "target": "es5",
"typeRoots": [ "typeRoots": [
"node_modules/@types" "node_modules/@types"
], ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment