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

IE11 fixes.

parent c31c1112
......@@ -2057,11 +2057,18 @@
}
else {
/** @type {?} */
var target = (/** @type {?} */ (event.target));
this.destinationHtmlElements.push(target);
this.oldDisplayStyles.push(target.style.display);
target.style.display = 'none';
this.nodeDraggingScope.shadowDragStarted = true;
var target_1 = (/** @type {?} */ (event.target));
/** @type {?} */
var cloneNode_1 = target_1.cloneNode(true);
target_1.parentNode.insertBefore(cloneNode_1, target_1);
target_1.style.visibility = 'collapse';
setTimeout((/**
* @return {?}
*/
function () {
target_1.parentNode.removeChild(cloneNode_1);
target_1.style.visibility = 'visible';
}), 0);
}
return;
}
......@@ -2096,12 +2103,29 @@
originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);
}
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++) {
this.destinationHtmlElements.push(this.draggedElements[i]);
this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display);
this.destinationHtmlElements[i].style.display = 'none';
}
if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {
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.
......@@ -155,10 +155,17 @@ export class FcNodeDraggingService {
else {
/** @type {?} */
const target = (/** @type {?} */ (event.target));
this.destinationHtmlElements.push(target);
this.oldDisplayStyles.push(target.style.display);
target.style.display = 'none';
this.nodeDraggingScope.shadowDragStarted = true;
/** @type {?} */
const cloneNode = target.cloneNode(true);
target.parentNode.insertBefore(cloneNode, target);
target.style.visibility = 'collapse';
setTimeout((/**
* @return {?}
*/
() => {
target.parentNode.removeChild(cloneNode);
target.style.visibility = 'visible';
}), 0);
}
return;
}
......@@ -193,12 +200,29 @@ export class FcNodeDraggingService {
originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);
}
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++) {
this.destinationHtmlElements.push(this.draggedElements[i]);
this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display);
this.destinationHtmlElements[i].style.display = 'none';
}
if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {
this.nodeDraggingScope.shadowDragStarted = true;
}
}
......@@ -466,4 +490,4 @@ if (false) {
/** @type {?} */
DropNodeInfo.prototype.offsetY;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS1kcmFnZ2luZy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWZsb3djaGFydC8iLCJzb3VyY2VzIjpbImxpYi9ub2RlLWRyYWdnaW5nLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUNBLE9BQU8sRUFBb0Isa0JBQWtCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQzs7TUFFeEUsYUFBYSxHQUFrQjtJQUNuQyxXQUFXLEVBQUUsSUFBSTtDQUNsQjtBQUVELE1BQU0sT0FBTyxxQk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bWVudCBleHRlbmRzIEhUTUxFbGVtZW50IHtcbiAgb2Zmc2V0SW5mbz86IHtcbiAgICBvZmZzZXRYOiBudW1iZXI7XG4gICAgb2Zmc2V0WTogbnVtYmVyO1xuICB9O1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIE5vZGVEcm9wU2NvcGUge1xuICBkcm9wRWxlbWVudDogTm9kZURyb3BFbGVtZW50O1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3BOb2RlSW5mbyB7XG4gIG5vZGU6IEZjTm9kZTtcbiAgZHJvcFRhcmdldElkOiBzdHJpbmc7XG4gIG9mZnNldFg6IG51bWJlcjtcbiAgb2Zmc2V0WTogbnVtYmVyO1xufVxuIl19
\ No newline at end of file
......@@ -201,11 +201,18 @@ var FcNodeDraggingService = /** @class */ (function () {
}
else {
/** @type {?} */
var target = (/** @type {?} */ (event.target));
this.destinationHtmlElements.push(target);
this.oldDisplayStyles.push(target.style.display);
target.style.display = 'none';
this.nodeDraggingScope.shadowDragStarted = true;
var target_1 = (/** @type {?} */ (event.target));
/** @type {?} */
var cloneNode_1 = target_1.cloneNode(true);
target_1.parentNode.insertBefore(cloneNode_1, target_1);
target_1.style.visibility = 'collapse';
setTimeout((/**
* @return {?}
*/
function () {
target_1.parentNode.removeChild(cloneNode_1);
target_1.style.visibility = 'visible';
}), 0);
}
return;
}
......@@ -240,12 +247,29 @@ var FcNodeDraggingService = /** @class */ (function () {
originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);
}
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++) {
this.destinationHtmlElements.push(this.draggedElements[i]);
this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display);
this.destinationHtmlElements[i].style.display = 'none';
}
if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {
this.nodeDraggingScope.shadowDragStarted = true;
}
}
......@@ -530,4 +554,4 @@ if (false) {
/** @type {?} */
DropNodeInfo.prototype.offsetY;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS1kcmFnZ2luZy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWZsb3djaGFydC8iLCJzb3VyY2VzIjpbImxpYi9ub2RlLWRyYWdnaW5nLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFDQSxPQUFPLEVBQW9CLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7O0lBRXhFLGFBQWEsR0FBa0I7SUFDbkMsV0FBVyxFQUFFLElBQUk7Q0FDbEI7QUFFRDtJQW9CRSwrQkFBWSxZQUE0QixFQUM1QixhQUFrRCxFQUNsRCxlQUF3QixFQUFFLGFBQXFCO1FBcEIzRCxzQkFBaUIsR0FBc0I7WUFDckMsaUJBQWlCLEVBQUUsS0FBSztZQUN4QixXQUFXLEVBQUUsSUFBSTtZQUNqQixZQUFZLEVBQUUsRUFBRTtZQUNoQixjQUFjLEVBQUUsRUFBRTtTQUNuQixDQUFDO1FBRU0sZ0JBQVcsR0FBZSxFQUFFLENBQUM7UUFDN0Isb0JBQWUsR0FBa0IsRUFBRSxDQUFDO1FBRXBDLDRCQUF1QixHQUFrQixFQUFFLENBQUM7UUFDNUMscUJBQWdCLEdBQWEsRUFBRSxDQUFDO1FBVXRDLElBQUksQ0FBQyxZQUFZLEdBQUcsWUFBWSxDQUFDO1FBQ2pDLElBQUksQ0FBQyxlQUFlLEdBQUcsZUFBZSxDQUFDO1FBQ3ZDLElB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ICAgIHRoaXMubm9kZURyYWdnaW5nU2NvcGUuZHJhZ2dlZE5vZGVzID0gbm9kZXM7XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBlbGVtZW50cy5sZW5ndGg7IGkrKykge1xuICAgICAgdGhpcy5kcmFnZ2VkRWxlbWVudHMucHVzaChlbGVtZW50c1tpXVswXSk7XG4gICAgICB0aGlzLmRyYWdPZmZzZXRzLnB1c2goXG4gICAgICAgIHtcbiAgICAgICAgICB4OiBvZmZzZXRzWFtpXSxcbiAgICAgICAgICB5OiBvZmZzZXRzWVtpXVxuICAgICAgICB9XG4gICAgICApO1xuICAgIH1cblxuICAgIGlmICh0aGlzLmRyYWdBbmltYXRpb24gPT09IEZsb3djaGFydENvbnN0YW50cy5kcmFnQW5pbWF0aW9uU2hhZG93KSB7XG4gICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMuZHJhZ2dlZEVsZW1lbnRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIGNvbnN0IGRyYWdPZmZzZXQgPSB0aGlzLmRyYWdPZmZzZXRzW2ldO1xuICAgICAgICBjb25zdCBkcmFnZ2VkTm9kZSA9IHRoaXMubm9kZURyYWdnaW5nU2NvcGUuZHJhZ2dlZE5vZGVzW2ldO1xuICAgICAgICBjb25zdCBzaGFkb3dFbGVtZW50ID0gJChgPGRpdiBzdHlsZT1cInBvc2l0aW9uOiBhYnNvbHV0ZTsgb3BhY2l0eTogMC43OyBgICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYHRvcDogJHt0aGlzLmdldFlDb29yZGluYXRlKGRyYWdPZmZzZXQueSArIGV2ZW50LmNsaWVudFkpfXB4OyBgICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYGxlZnQ6ICR7dGhpcy5nZXRYQ29vcmRpbmF0ZShkcmFnT2Zmc2V0LnggKyBldmVudC5jbGllbnRYKX1weDsgXCI+YCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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m9kZXM6IEFycmF5PEZjTm9kZT47XG4gIHNoYWRvd0VsZW1lbnRzOiBBcnJheTxKUXVlcnk8SFRNTEVsZW1lbnQ+PjtcbiAgc2hhZG93RHJhZ1N0YXJ0ZWQ6IGJvb2xlYW47XG4gIGRyb3BFbGVtZW50OiBIVE1MRWxlbWVudDtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBOb2RlRHJvcEVsZW1lbnQgZXh0ZW5kcyBIVE1MRWxlbWVudCB7XG4gIG9mZnNldEluZm8/OiB7XG4gICAgb2Zmc2V0WDogbnVtYmVyO1xuICAgIG9mZnNldFk6IG51bWJlcjtcbiAgfTtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBOb2RlRHJvcFNjb3BlIHtcbiAgZHJvcEVsZW1lbnQ6IE5vZGVEcm9wRWxlbWVudDtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBEcm9wTm9kZUluZm8ge1xuICBub2RlOiBGY05vZGU7XG4gIGRyb3BUYXJnZXRJZDogc3RyaW5nO1xuICBvZmZzZXRYOiBudW1iZXI7XG4gIG9mZnNldFk6IG51bWJlcjtcbn1cbiJdfQ==
\ No newline at end of file
......@@ -1521,10 +1521,17 @@ class FcNodeDraggingService {
else {
/** @type {?} */
const target = (/** @type {?} */ (event.target));
this.destinationHtmlElements.push(target);
this.oldDisplayStyles.push(target.style.display);
target.style.display = 'none';
this.nodeDraggingScope.shadowDragStarted = true;
/** @type {?} */
const cloneNode = target.cloneNode(true);
target.parentNode.insertBefore(cloneNode, target);
target.style.visibility = 'collapse';
setTimeout((/**
* @return {?}
*/
() => {
target.parentNode.removeChild(cloneNode);
target.style.visibility = 'visible';
}), 0);
}
return;
}
......@@ -1559,12 +1566,29 @@ class FcNodeDraggingService {
originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);
}
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++) {
this.destinationHtmlElements.push(this.draggedElements[i]);
this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display);
this.destinationHtmlElements[i].style.display = 'none';
}
if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {
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 () {
}
else {
/** @type {?} */
var target = (/** @type {?} */ (event.target));
this.destinationHtmlElements.push(target);
this.oldDisplayStyles.push(target.style.display);
target.style.display = 'none';
this.nodeDraggingScope.shadowDragStarted = true;
var target_1 = (/** @type {?} */ (event.target));
/** @type {?} */
var cloneNode_1 = target_1.cloneNode(true);
target_1.parentNode.insertBefore(cloneNode_1, target_1);
target_1.style.visibility = 'collapse';
setTimeout((/**
* @return {?}
*/
function () {
target_1.parentNode.removeChild(cloneNode_1);
target_1.style.visibility = 'visible';
}), 0);
}
return;
}
......@@ -1900,12 +1907,29 @@ var FcNodeDraggingService = /** @class */ (function () {
originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);
}
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++) {
this.destinationHtmlElements.push(this.draggedElements[i]);
this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display);
this.destinationHtmlElements[i].style.display = 'none';
}
if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {
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 @@
"version": "0.0.0",
"scripts": {
"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",
"test": "ng test ngx-flowchart",
"lint": "ng lint",
......
......@@ -122,10 +122,13 @@ export class FcNodeDraggingService {
originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);
} else {
const target: HTMLElement = event.target as HTMLElement;
this.destinationHtmlElements.push(target);
this.oldDisplayStyles.push(target.style.display);
target.style.display = 'none';
this.nodeDraggingScope.shadowDragStarted = true;
const cloneNode = target.cloneNode(true);
target.parentNode.insertBefore(cloneNode, target);
target.style.visibility = 'collapse';
setTimeout(() => {
target.parentNode.removeChild(cloneNode);
target.style.visibility = 'visible';
}, 0);
}
return;
}
......@@ -158,12 +161,21 @@ export class FcNodeDraggingService {
if (originalEvent.dataTransfer.setDragImage) {
originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);
} 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++) {
this.destinationHtmlElements.push(this.draggedElements[i]);
this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display);
this.destinationHtmlElements[i].style.display = 'none';
}
if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {
this.nodeDraggingScope.shadowDragStarted = true;
}
}
......
......@@ -56,7 +56,7 @@
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'core-js/es/array';
/***************************************************************************************************
* APPLICATION IMPORTS
......
......@@ -10,7 +10,7 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2015",
"target": "es5",
"typeRoots": [
"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