删除指定的图形(Shape)或者组(Group)
@param {string|Array.<string>} [el] 如果为空清空整个Storage
516399
function (el) {
        if (el == null) {
            // 不指定el清空
            for (var i = 0; i < this._roots.length; i++) {
                var root = this._roots[i];
                if (root instanceof Group) {
                    root.delChildrenFromStorage(this);
                }
            }

            this._roots = [];
            this._displayList = [];
            this._displayListLen = 0;

            return;
        }

        if (el instanceof Array) {
            for (var i = 0, l = el.length; i < l; i++) {
                this.delRoot(el[i]);
            }
            return;
        }


        var idx = util.indexOf(this._roots, el);
        if (idx >= 0) {
            this.delFromStorage(el);
            this._roots.splice(idx, 1);
            if (el instanceof Group) {
                el.delChildrenFromStorage(this);
            }
        }
    }
272811
function( element, set ) {
			var i = 0, length = set.length;
			for ( ; i < length; i++ ) {
				if ( set[ i ] !== null ) {
					element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
				}
			}
		}
475352
void removeElement(int element_handle) {
		if (m_b_store_duplicates)
			throw new GeometryException("invalid call");

		int quad_handle = get_quad_(element_handle);
		disconnect_element_handle_(element_handle);
		free_element_and_box_node_(element_handle);

		int q = quad_handle;

		while (q != -1) {
			set_sub_tree_element_count_(q, get_sub_tree_element_count_(q) - 1);
			int parent = get_parent_(q);

			if (get_sub_tree_element_count_(q) == 0) {
				assert (get_local_element_count_(q) == 0);

				if (q != m_root) {
					int quadrant = get_quadrant_(q);
					m_quad_tree_nodes.deleteElement(q);
					set_child_(parent, quadrant, -1);
				}
			}

			q = parent;
		}
	}
1205882
function(el) {
    if (!el) {
      return false;
    }
    var styles = _getComputedStyle(el, null);
    if (!styles) {
      return false;
    }
    var hasCssHeight = _parseFloat(styles.height) > 0;
    var hasCssWidth = _parseFloat(styles.width) > 0;
    var hasCssTop = _parseFloat(styles.top) >= 0;
    var hasCssLeft = _parseFloat(styles.left) >= 0;
    var cssKnows = hasCssHeight && hasCssWidth && hasCssTop && hasCssLeft;
    var rect = cssKnows ? null : _getElementPosition(el);
    var isVisible = styles.display !== "none" && styles.visibility !== "collapse" && (cssKnows || !!rect && (hasCssHeight || rect.height > 0) && (hasCssWidth || rect.width > 0) && (hasCssTop || rect.top >= 0) && (hasCssLeft || rect.left >= 0));
    return isVisible;
  }
611279
function clean(collection) {
    var ns = /\S/;
    collection.each(function(el) {
        var d = el,
            n = d.firstChild,
            ni = -1,
            nx;
        while (n) {
            nx = n.nextSibling;
            if (n.nodeType == 3 && !ns.test(n.nodeValue)) {
                d.removeChild(n);
            } else {
                n.nodeIndex = ++ni; // FIXME not sure what this is for, and causes IE to bomb (the setter) - @rem
            }
            n = nx;
        }
    });
}
686497
function (el) {
        if (el.__storage === this) {
            return;
        }

        if (el instanceof Group) {
            el.addChildrenToStorage(this);
        }

        this.addToStorage(el);
        this._roots.push(el);
    }
608087
function removeShape(shape) {
         me.utils.array.remove(this.shapes, shape); // update the body bounds to take in account the removed shape

         this.updateBounds(); // return the length of the shape list

         return this.shapes.length;
       }
179588
function(aKeyIndexes, newIndex) {
    if(lang.isArray(aKeyIndexes) && lang.isNumber(newIndex) && this._elColgroup && (this._elColgroup.childNodes.length > aKeyIndexes[aKeyIndexes.length-1])) {
        var i,
            tmpCols = [];
        // Remove COL
        for(i=aKeyIndexes.length-1; i>-1; i--) {
            tmpCols.push(this._elColgroup.removeChild(this._elColgroup.childNodes[aKeyIndexes[i]]));
        }
        // Insert COL
        var nextSibling = this._elColgroup.childNodes[newIndex] || null;
        for(i=tmpCols.length-1; i>-1; i--) {
            this._elColgroup.insertBefore(tmpCols[i], nextSibling);
        }
    }
}
197032
function() {
    var elTable = this._elHdTable;
    if(elTable) {
        Ev.purgeElement(elTable, true);
        elTable.parentNode.removeChild(elTable);
        
        // A little out of place, but where else can we null out these extra elements?
        ///this._elBdColgroup = null;
        this._elBdThead = null;
    }
}
1313947
function removeFromArrayByNode(node, eleNode) {
  const elements = node.elements;

  if (!elements.includes(eleNode)) {
    logger.warn('Failed to find element when trying to remove element from array.');
    return [];
  }

  if (!node._filePath) {
    throw new Error('No _filePath property found on node when removing element from array');
  }

  const content = vio.getContent(node._filePath);

  let startPos = nearestCharBefore(',', content, eleNode.start);
  let isFirstElement = false;
  if (startPos < 0) {
    // it's the first element
    isFirstElement = true;
    startPos = node.start + 1; // start from the char just after the '['
  }

  let endPos = eleNode.end;

  if (elements.length === 1 || isFirstElement) {
    // if the element is the only element, try to remove the trailing comma if exists
    const nextComma = nearestCharAfter(',', content, endPos - 1);
    if (nextComma >= 0) endPos = nextComma + 1;
  }

  return [
    {
      start: startPos,
      end: endPos,
      replacement: '',
    },
  ];
}
582479
function(element, event, callback) {

    const eventStack = ChuiEventCache.elements[element.id]
    if (!eventStack) return
    let deleteOrder = []

    if (!event) {
      deleteOrder = []
      eventStack.forEach(function(evt, idx) {
        element.removeEventListener(evt.event, evt.callback, evt.capturePhase)
        deleteOrder.push(idx)
      })

      deleteFromEventStack(deleteOrder, eventStack)

    } else if (!!event && !callback) {
      deleteOrder = []
      eventStack.forEach(function(evt, idx) {
        if (evt.event === event) {
          element.removeEventListener(evt.event, evt.callback, evt.capturePhase)
          deleteOrder.push(idx)
        }
      })

      deleteFromEventStack(deleteOrder, eventStack)

    } else if (callback) {
      deleteOrder = []
      eventStack.forEach(function(evt, idx) {
        if (callback === evt.callback) {
          element.removeEventListener(evt.event, evt.callback, evt.capturePhase)
          deleteOrder.push(idx)
        }
      })
      deleteFromEventStack(deleteOrder, eventStack)
    }
  }
1356115
function InMemoryStorage() {

	var store = {};
    var self = this;

	this.getItem = function(key) {
		return store[key] || null;
	};

	this.setItem = function(key, value) {
		store[key] = value;
        updateLength();
	};

	this.removeItem = function(key) {
		delete store[key];
        updateLength();
	};

	this.clear = function() {
		store = {};
        updateLength();
	};

    function updateLength() {
        self.length = Object.keys(store).length
    }

    updateLength();
}
698824
function removeElData(el) {
  var id = el[elIdAttr];

  if (!id) {
    return;
  }

  // Remove all stored data
  delete elData[id];

  // Remove the elIdAttr property from the DOM node
  try {
    delete el[elIdAttr];
  } catch (e) {
    if (el.removeAttribute) {
      el.removeAttribute(elIdAttr);
    } else {
      // IE doesn't appear to support removeAttribute on the document element
      el[elIdAttr] = null;
    }
  }
}
333518
function(els) {
            	var i, j, elements = els.elements || els;
            	if (typeof(elements[0][0]) != 'undefined') {
            	    i = elements.length;
            	    this.elements = [];
            	    while (i--) {
            		j = elements[i].length;
            		this.elements[i] = [];
            		while (j--) {
            		    this.elements[i][j] = elements[i][j];
            		}
            	    }
            	    return this;
            	}
            	var n = elements.length;
            	this.elements = [];
            	for (i = 0; i < n; i++) {
            	    this.elements.push([elements[i]]);
            	}
            	return this;
                }
1114330
function (element) {
            var self = this;
            var $el = self.$el;    // 隐藏当然不包含了
            // 隐藏当然不包含了
            if (!self.get('visible') || !$el) {
                return false;
            }
            if ($el && ($el[0] === element || $el.contains(element))) {
                return true;
            }
            var children = self.get('children');
            for (var i = 0, count = children.length; i < count; i++) {
                var child = children[i];
                if (child.containsElement && child.containsElement(element)) {
                    return true;
                }
            }
            return false;
        }
938202
function _orphan(_el) {
            var id = _jsPlumb.getId(_el);
            var pos = _jsPlumb.getOffset(_el);
            _el.parentNode.removeChild(_el);
            _jsPlumb.getContainer().appendChild(_el);
            _jsPlumb.setPosition(_el, pos);
            delete _el._jsPlumbGroup;
            _unbindDragHandlers(_el);
            _jsPlumb.dragManager.clearParent(_el, id);
        }
1302806
function(element, set) {
		for(var i=0; i < set.length; i++) {
			if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i]));
		}
	}