code
stringlengths
24
2.07M
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
92
language
stringclasses
1 value
repo
stringlengths
5
64
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
function returnFalse() { return false; }
Returns whether the query matches for the element @param query The `{ type, value, ... }` query object @param ele The element to compare against
returnFalse
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function returnTrue() { return true; } // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
Returns whether the query matches for the element @param query The `{ type, value, ... }` query object @param ele The element to compare against
returnTrue
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function Emitter() { var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyOpts; var context = arguments.length > 1 ? arguments[1] : undefined; // micro-optimisation vs Object.assign() -- reduces Element instantiation time for (var i = 0; i < defaultsKeys.length; i++) { var key = defaultsKeys[i]; this[key] = opts[key] || defaults$8[key]; } this.context = context || this.context; this.listeners = []; this.emitting = 0; }
Returns whether the query matches for the element @param query The `{ type, value, ... }` query object @param ele The element to compare against
Emitter
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
forEachEvent = function forEachEvent(self, handler, events, qualifier, callback, conf, confOverrides) { if (fn(qualifier)) { callback = qualifier; qualifier = null; } if (confOverrides) { if (conf == null) { conf = confOverrides; } else { conf = extend({}, conf, confOverrides); } } var eventList = array(events) ? events : events.split(/\s+/); for (var i = 0; i < eventList.length; i++) { var evt = eventList[i]; if (emptyString(evt)) { continue; } var match = evt.match(eventRegex); // type[.namespace] if (match) { var type = match[1]; var namespace = match[2] ? match[2] : null; var ret = handler(self, evt, type, namespace, qualifier, callback, conf); if (ret === false) { break; } // allow exiting early } } }
Returns whether the query matches for the element @param query The `{ type, value, ... }` query object @param ele The element to compare against
forEachEvent
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
makeEventObj = function makeEventObj(self, obj) { self.addEventFields(self.context, obj); return new Event(obj.type, obj); }
Returns whether the query matches for the element @param query The `{ type, value, ... }` query object @param ele The element to compare against
makeEventObj
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
forEachEventObj = function forEachEventObj(self, handler, events) { if (event(events)) { handler(self, events); return; } else if (plainObject(events)) { handler(self, makeEventObj(self, events)); return; } var eventList = array(events) ? events : events.split(/\s+/); for (var i = 0; i < eventList.length; i++) { var evt = eventList[i]; if (emptyString(evt)) { continue; } var match = evt.match(eventRegex); // type[.namespace] if (match) { var type = match[1]; var namespace = match[2] ? match[2] : null; var eventObj = makeEventObj(self, { type: type, namespace: namespace, target: self.context }); handler(self, eventObj); } } }
Returns whether the query matches for the element @param query The `{ type, value, ... }` query object @param ele The element to compare against
forEachEventObj
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
_loop = function _loop(i) { var listener = listeners[i]; forEachEvent(_this, function (self, event, type, namespace, qualifier, callback /*, conf*/ ) { if ((listener.type === type || events === '*') && (!namespace && listener.namespace !== '.*' || listener.namespace === namespace) && (!qualifier || self.qualifierCompare(listener.qualifier, qualifier)) && (!callback || listener.callback === callback)) { listeners.splice(i, 1); return false; } }, events, qualifier, callback, conf); }
Returns whether the query matches for the element @param query The `{ type, value, ... }` query object @param ele The element to compare against
_loop
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
_loop2 = function _loop2(i) { var listener = listeners[i]; if (listener.type === eventObj.type && (!listener.namespace || listener.namespace === eventObj.namespace || listener.namespace === universalNamespace) && self.eventMatches(self.context, listener, eventObj)) { var args = [eventObj]; if (extraParams != null) { push(args, extraParams); } self.beforeEmit(self.context, listener, eventObj); if (listener.conf && listener.conf.one) { self.listeners = self.listeners.filter(function (l) { return l !== listener; }); } var context = self.callbackContext(self.context, listener, eventObj); var ret = listener.callback.apply(context, args); self.afterEmit(self.context, listener, eventObj); if (ret === false) { eventObj.stopPropagation(); eventObj.preventDefault(); } } // if listener matches }
Returns whether the query matches for the element @param query The `{ type, value, ... }` query object @param ele The element to compare against
_loop2
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
argSelector = function argSelector(arg) { if (string(arg)) { return new Selector(arg); } else { return arg; } }
Returns whether the query matches for the element @param query The `{ type, value, ... }` query object @param ele The element to compare against
argSelector
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
add = function add(col, other) { for (var i = 0; i < col.length; i++) { var ele = col[i]; var id = ele._private.data.id; var inOther = other.hasElementWithId(id); if (!inOther) { elements.push(ele); } } }
Returns whether the query matches for the element @param query The `{ type, value, ... }` query object @param ele The element to compare against
add
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
add = function add(col, other, retEles) { for (var i = 0; i < col.length; i++) { var ele = col[i]; var id = ele._private.data.id; var inOther = other.hasElementWithId(id); if (inOther) { both.merge(ele); } else { retEles.push(ele); } } }
Returns whether the query matches for the element @param query The `{ type, value, ... }` query object @param ele The element to compare against
add
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
zIndexSort = function zIndexSort(a, b) { var cy = a.cy(); var hasCompoundNodes = cy.hasCompoundNodes(); function getDepth(ele) { var style = ele.pstyle('z-compound-depth'); if (style.value === 'auto') { return hasCompoundNodes ? ele.zDepth() : 0; } else if (style.value === 'bottom') { return -1; } else if (style.value === 'top') { return MAX_INT; } // 'orphan' return 0; } var depthDiff = getDepth(a) - getDepth(b); if (depthDiff !== 0) { return depthDiff; } function getEleDepth(ele) { var style = ele.pstyle('z-index-compare'); if (style.value === 'auto') { return ele.isNode() ? 1 : 0; } // 'manual' return 0; } var eleDiff = getEleDepth(a) - getEleDepth(b); if (eleDiff !== 0) { return eleDiff; } var zDiff = a.pstyle('z-index').value - b.pstyle('z-index').value; if (zDiff !== 0) { return zDiff; } // compare indices in the core (order added to graph w/ last on top) return a.poolIndex() - b.poolIndex(); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
zIndexSort
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function getDepth(ele) { var style = ele.pstyle('z-compound-depth'); if (style.value === 'auto') { return hasCompoundNodes ? ele.zDepth() : 0; } else if (style.value === 'bottom') { return -1; } else if (style.value === 'top') { return MAX_INT; } // 'orphan' return 0; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
getDepth
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function getEleDepth(ele) { var style = ele.pstyle('z-index-compare'); if (style.value === 'auto') { return ele.isNode() ? 1 : 0; } // 'manual' return 0; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
getEleDepth
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
defineSymbolIterator = function defineSymbolIterator() { var typeofUndef = "undefined" ; var isIteratorSupported = (typeof Symbol === "undefined" ? "undefined" : _typeof(Symbol)) != typeofUndef && _typeof(Symbol.iterator) != typeofUndef; // eslint-disable-line no-undef if (isIteratorSupported) { elesfn$p[Symbol.iterator] = function () { var _this = this; // eslint-disable-line no-undef var entry = { value: undefined, done: false }; var i = 0; var length = this.length; return _defineProperty({ next: function next() { if (i < length) { entry.value = _this[i++]; } else { entry.value = undefined; entry.done = true; } return entry; } }, Symbol.iterator, function () { // eslint-disable-line no-undef return this; }); }; } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
defineSymbolIterator
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
getMemoizeKey = function getMemoizeKey(node) { return node.id(); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
getMemoizeKey
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
calculateSpacing = function calculateSpacing(spacing, nodesBb, pos) { var center = { x: nodesBb.x1 + nodesBb.w / 2, y: nodesBb.y1 + nodesBb.h / 2 }; var spacingVector = { // scale from center of bounding box (not necessarily 0,0) x: (pos.x - center.x) * spacing, y: (pos.y - center.y) * spacing }; return { x: center.x + spacingVector.x, y: center.y + spacingVector.y }; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
calculateSpacing
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
spacingBb = function spacingBb() { if (!useSpacingFactor) { return null; } var bb = makeBoundingBox(); for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; var pos = fnMem(node, i); expandBoundingBoxByPoint(bb, pos.x, pos.y); } return bb; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
spacingBb
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function styleCache(key, fn, ele) { var _p = ele._private; var cache = _p.styleCache = _p.styleCache || []; var val; if ((val = cache[key]) != null) { return val; } else { val = cache[key] = fn(ele); return val; } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
styleCache
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function cacheStyleFunction(key, fn) { key = hashString(key); return function cachedStyleFunction(ele) { return styleCache(key, fn, ele); }; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
cacheStyleFunction
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function cachePrototypeStyleFunction(key, fn) { key = hashString(key); var selfFn = function selfFn(ele) { return fn.call(ele); }; return function cachedPrototypeStyleFunction() { var ele = this[0]; if (ele) { return styleCache(key, selfFn, ele); } }; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
cachePrototypeStyleFunction
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
selfFn = function selfFn(ele) { return fn.call(ele); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
selfFn
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
dirty = function dirty(ele) { return ele._private.styleCache = null; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
dirty
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function checkCompound(ele, parentOk) { var _p = ele._private; var parents = _p.data.parent ? ele.parents() : null; if (parents) { for (var i = 0; i < parents.length; i++) { var parent = parents[i]; if (!parentOk(parent)) { return false; } } } return true; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
checkCompound
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function defineDerivedStateFunction(specs) { var ok = specs.ok; var edgeOkViaNode = specs.edgeOkViaNode || specs.ok; var parentOk = specs.parentOk || specs.ok; return function () { var cy = this.cy(); if (!cy.styleEnabled()) { return true; } var ele = this[0]; var hasCompoundNodes = cy.hasCompoundNodes(); if (ele) { var _p = ele._private; if (!ok(ele)) { return false; } if (ele.isNode()) { return !hasCompoundNodes || checkCompound(ele, parentOk); } else { var src = _p.source; var tgt = _p.target; return edgeOkViaNode(src) && (!hasCompoundNodes || checkCompound(src, edgeOkViaNode)) && (src === tgt || edgeOkViaNode(tgt) && (!hasCompoundNodes || checkCompound(tgt, edgeOkViaNode))); } } }; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
defineDerivedStateFunction
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function defineSwitchFunction(params) { return function () { var args = arguments; var changedEles = []; // e.g. cy.nodes().select( data, handler ) if (args.length === 2) { var data = args[0]; var handler = args[1]; this.on(params.event, data, handler); } // e.g. cy.nodes().select( handler ) else if (args.length === 1 && fn(args[0])) { var _handler = args[0]; this.on(params.event, _handler); } // e.g. cy.nodes().select() // e.g. (private) cy.nodes().select(['tapselect']) else if (args.length === 0 || args.length === 1 && array(args[0])) { var addlEvents = args.length === 1 ? args[0] : null; for (var i = 0; i < this.length; i++) { var ele = this[i]; var able = !params.ableField || ele._private[params.ableField]; var changed = ele._private[params.field] != params.value; if (params.overrideAble) { var overrideAble = params.overrideAble(ele); if (overrideAble !== undefined) { able = overrideAble; if (!overrideAble) { return this; } // to save cycles assume not able for all on override } } if (able) { ele._private[params.field] = params.value; if (changed) { changedEles.push(ele); } } } var changedColl = this.spawn(changedEles); changedColl.updateStyle(); // change of state => possible change of style changedColl.emit(params.event); if (addlEvents) { changedColl.emit(addlEvents); } } return this; }; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
defineSwitchFunction
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function defineSwitchSet(params) { elesfn$s[params.field] = function () { var ele = this[0]; if (ele) { if (params.overrideField) { var val = params.overrideField(ele); if (val !== undefined) { return val; } } return ele._private[params.field]; } }; elesfn$s[params.on] = defineSwitchFunction({ event: params.on, field: params.field, ableField: params.ableField, overrideAble: params.overrideAble, value: true }); elesfn$s[params.off] = defineSwitchFunction({ event: params.off, field: params.field, ableField: params.ableField, overrideAble: params.overrideAble, value: false }); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
defineSwitchSet
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
defineDagExtremity = function defineDagExtremity(params) { return function dagExtremityImpl(selector) { var eles = this; var ret = []; for (var i = 0; i < eles.length; i++) { var ele = eles[i]; if (!ele.isNode()) { continue; } var disqualified = false; var edges = ele.connectedEdges(); for (var j = 0; j < edges.length; j++) { var edge = edges[j]; var src = edge.source(); var tgt = edge.target(); if (params.noIncomingEdges && tgt === ele && src !== ele || params.noOutgoingEdges && src === ele && tgt !== ele) { disqualified = true; break; } } if (!disqualified) { ret.push(ele); } } return this.spawn(ret, true).filter(selector); }; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
defineDagExtremity
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
defineDagOneHop = function defineDagOneHop(params) { return function (selector) { var eles = this; var oEles = []; for (var i = 0; i < eles.length; i++) { var ele = eles[i]; if (!ele.isNode()) { continue; } var edges = ele.connectedEdges(); for (var j = 0; j < edges.length; j++) { var edge = edges[j]; var src = edge.source(); var tgt = edge.target(); if (params.outgoing && src === ele) { oEles.push(edge); oEles.push(tgt); } else if (params.incoming && tgt === ele) { oEles.push(edge); oEles.push(src); } } } return this.spawn(oEles, true).filter(selector); }; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
defineDagOneHop
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
defineDagAllHops = function defineDagAllHops(params) { return function (selector) { var eles = this; var sEles = []; var sElesIds = {}; for (;;) { var next = params.outgoing ? eles.outgoers() : eles.incomers(); if (next.length === 0) { break; } // done if none left var newNext = false; for (var i = 0; i < next.length; i++) { var n = next[i]; var nid = n.id(); if (!sElesIds[nid]) { sElesIds[nid] = true; sEles.push(n); newNext = true; } } if (!newNext) { break; } // done if touched all outgoers already eles = next; } return this.spawn(sEles, true).filter(selector); }; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
defineDagAllHops
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function defineSourceFunction(params) { return function sourceImpl(selector) { var sources = []; for (var i = 0; i < this.length; i++) { var ele = this[i]; var src = ele._private[params.attr]; if (src) { sources.push(src); } } return this.spawn(sources, true).filter(selector); }; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
defineSourceFunction
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function defineEdgesWithFunction(params) { return function edgesWithImpl(otherNodes) { var elements = []; var cy = this._private.cy; var p = params || {}; // get elements if a selector is specified if (string(otherNodes)) { otherNodes = cy.$(otherNodes); } for (var h = 0; h < otherNodes.length; h++) { var edges = otherNodes[h]._private.edges; for (var i = 0; i < edges.length; i++) { var edge = edges[i]; var edgeData = edge._private.data; var thisToOther = this.hasElementWithId(edgeData.source) && otherNodes.hasElementWithId(edgeData.target); var otherToThis = otherNodes.hasElementWithId(edgeData.source) && this.hasElementWithId(edgeData.target); var edgeConnectsThisAndOther = thisToOther || otherToThis; if (!edgeConnectsThisAndOther) { continue; } if (p.thisIsSrc || p.thisIsTgt) { if (p.thisIsSrc && !thisToOther) { continue; } if (p.thisIsTgt && !otherToThis) { continue; } } elements.push(edge); } } return this.spawn(elements, true); }; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
defineEdgesWithFunction
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function defineParallelEdgesFunction(params) { var defaults = { codirected: false }; params = extend({}, defaults, params); return function parallelEdgesImpl(selector) { // micro-optimised for renderer var elements = []; var edges = this.edges(); var p = params; // look at all the edges in the collection for (var i = 0; i < edges.length; i++) { var edge1 = edges[i]; var edge1_p = edge1._private; var src1 = edge1_p.source; var srcid1 = src1._private.data.id; var tgtid1 = edge1_p.data.target; var srcEdges1 = src1._private.edges; // look at edges connected to the src node of this edge for (var j = 0; j < srcEdges1.length; j++) { var edge2 = srcEdges1[j]; var edge2data = edge2._private.data; var tgtid2 = edge2data.target; var srcid2 = edge2data.source; var codirected = tgtid2 === tgtid1 && srcid2 === srcid1; var oppdirected = srcid1 === tgtid2 && tgtid1 === srcid2; if (p.codirected && codirected || !p.codirected && (codirected || oppdirected)) { elements.push(edge2); } } } return this.spawn(elements, true).filter(selector); }; } // Misc functions
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
defineParallelEdgesFunction
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
visitInComponent = function visitInComponent(node, component) { visited.merge(node); unvisited.unmerge(node); component.merge(node); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
visitInComponent
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
_loop = function _loop() { // each iteration yields a component var cmpt = cy.collection(); components.push(cmpt); var root = unvisited[0]; visitInComponent(root, cmpt); self.bfs({ directed: false, roots: root, visit: function visit(v) { return visitInComponent(v, cmpt); } }); cmpt.forEach(function (node) { node.connectedEdges().forEach(function (e) { // connectedEdges() usually cached if (self.has(e) && cmpt.has(e.source()) && cmpt.has(e.target())) { // has() is cheap cmpt.merge(e); // forEach() only considers nodes -- sets N at call time } }); }); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
_loop
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
Collection = function Collection(cy, elements) { var unique = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; if (cy === undefined) { error('A collection must have a reference to the core'); return; } var map = new Map$1(); var createdElements = false; if (!elements) { elements = []; } else if (elements.length > 0 && plainObject(elements[0]) && !element(elements[0])) { createdElements = true; // make elements from json and restore all at once later var eles = []; var elesIds = new Set$1(); for (var i = 0, l = elements.length; i < l; i++) { var json = elements[i]; if (json.data == null) { json.data = {}; } var _data = json.data; // make sure newly created elements have valid ids if (_data.id == null) { _data.id = uuid(); } else if (cy.hasElementWithId(_data.id) || elesIds.has(_data.id)) { continue; // can't create element if prior id already exists } var ele = new Element(cy, json, false); eles.push(ele); elesIds.add(_data.id); } elements = eles; } this.length = 0; for (var _i = 0, _l = elements.length; _i < _l; _i++) { var element$1 = elements[_i][0]; // [0] in case elements is an array of collections, rather than array of elements if (element$1 == null) { continue; } var id = element$1._private.data.id; if (!unique || !map.has(id)) { if (unique) { map.set(id, { index: this.length, ele: element$1 }); } this[this.length] = element$1; this.length++; } } this._private = { eles: this, cy: cy, get map() { if (this.lazyMap == null) { this.rebuildMap(); } return this.lazyMap; }, set map(m) { this.lazyMap = m; }, rebuildMap: function rebuildMap() { var m = this.lazyMap = new Map$1(); var eles = this.eles; for (var _i2 = 0; _i2 < eles.length; _i2++) { var _ele = eles[_i2]; m.set(_ele.id(), { index: _i2, ele: _ele }); } } }; if (unique) { this._private.map = map; } // restore the elements if we created them from json if (createdElements) { this.restore(); } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
Collection
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
get map() { if (this.lazyMap == null) { this.rebuildMap(); } return this.lazyMap; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
map
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
set map(m) { this.lazyMap = m; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
map
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
checkSwitch = function checkSwitch(k, trueFnName, falseFnName) { var obj_k = obj[k]; if (obj_k != null && obj_k !== p[k]) { if (obj_k) { ele[trueFnName](); } else { ele[falseFnName](); } } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
checkSwitch
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
removeFromElements = function removeFromElements() { elements.splice(i, 1); i--; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
removeFromElements
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function addConnectedEdges(node) { var edges = node._private.edges; for (var i = 0; i < edges.length; i++) { add(edges[i]); } } // add descendant nodes
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
addConnectedEdges
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function addChildren(node) { var children = node._private.children; for (var i = 0; i < children.length; i++) { add(children[i]); } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
addChildren
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function add(ele) { var alreadyAdded = elesToRemoveIds[ele.id()]; if (removeFromPool && ele.removed() || alreadyAdded) { return; } else { elesToRemoveIds[ele.id()] = true; } if (ele.isNode()) { elesToRemove.push(ele); // nodes are removed last addConnectedEdges(ele); addChildren(ele); } else { elesToRemove.unshift(ele); // edges are removed first } } // make the list of elements to remove
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
add
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function removeEdgeRef(node, edge) { var connectedEdges = node._private.edges; removeFromArray(connectedEdges, edge); // removing an edges invalidates the traversal cache for its nodes node.clearTraversalCache(); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
removeEdgeRef
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function removeParallelRef(pllEdge) { // removing an edge invalidates the traversal caches for the parallel edges pllEdge.clearTraversalCache(); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
removeParallelRef
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function removeChildRef(parent, ele) { ele = ele[0]; parent = parent[0]; var children = parent._private.children; var pid = parent.id(); removeFromArray(children, ele); // remove parent => child ref ele._private.parent = null; // remove child => parent ref if (!alteredParents.ids[pid]) { alteredParents.ids[pid] = true; alteredParents.push(parent); } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
removeChildRef
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
toString = function toString(id) { return id == null ? id : '' + id; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
toString
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function generateCubicBezier(mX1, mY1, mX2, mY2) { var NEWTON_ITERATIONS = 4, NEWTON_MIN_SLOPE = 0.001, SUBDIVISION_PRECISION = 0.0000001, SUBDIVISION_MAX_ITERATIONS = 10, kSplineTableSize = 11, kSampleStepSize = 1.0 / (kSplineTableSize - 1.0), float32ArraySupported = typeof Float32Array !== 'undefined'; /* Must contain four arguments. */ if (arguments.length !== 4) { return false; } /* Arguments must be numbers. */ for (var i = 0; i < 4; ++i) { if (typeof arguments[i] !== "number" || isNaN(arguments[i]) || !isFinite(arguments[i])) { return false; } } /* X values must be in the [0, 1] range. */ mX1 = Math.min(mX1, 1); mX2 = Math.min(mX2, 1); mX1 = Math.max(mX1, 0); mX2 = Math.max(mX2, 0); var mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize); function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; } function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; } function C(aA1) { return 3.0 * aA1; } function calcBezier(aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; } function getSlope(aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); } function newtonRaphsonIterate(aX, aGuessT) { for (var _i = 0; _i < NEWTON_ITERATIONS; ++_i) { var currentSlope = getSlope(aGuessT, mX1, mX2); if (currentSlope === 0.0) { return aGuessT; } var currentX = calcBezier(aGuessT, mX1, mX2) - aX; aGuessT -= currentX / currentSlope; } return aGuessT; } function calcSampleValues() { for (var _i2 = 0; _i2 < kSplineTableSize; ++_i2) { mSampleValues[_i2] = calcBezier(_i2 * kSampleStepSize, mX1, mX2); } } function binarySubdivide(aX, aA, aB) { var currentX, currentT, i = 0; do { currentT = aA + (aB - aA) / 2.0; currentX = calcBezier(currentT, mX1, mX2) - aX; if (currentX > 0.0) { aB = currentT; } else { aA = currentT; } } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS); return currentT; } function getTForX(aX) { var intervalStart = 0.0, currentSample = 1, lastSample = kSplineTableSize - 1; for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) { intervalStart += kSampleStepSize; } --currentSample; var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]), guessForT = intervalStart + dist * kSampleStepSize, initialSlope = getSlope(guessForT, mX1, mX2); if (initialSlope >= NEWTON_MIN_SLOPE) { return newtonRaphsonIterate(aX, guessForT); } else if (initialSlope === 0.0) { return guessForT; } else { return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize); } } var _precomputed = false; function precompute() { _precomputed = true; if (mX1 !== mY1 || mX2 !== mY2) { calcSampleValues(); } } var f = function f(aX) { if (!_precomputed) { precompute(); } if (mX1 === mY1 && mX2 === mY2) { return aX; } if (aX === 0) { return 0; } if (aX === 1) { return 1; } return calcBezier(getTForX(aX), mY1, mY2); }; f.getControlPoints = function () { return [{ x: mX1, y: mY1 }, { x: mX2, y: mY2 }]; }; var str = "generateBezier(" + [mX1, mY1, mX2, mY2] + ")"; f.toString = function () { return str; }; return f; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
generateCubicBezier
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
A
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
B
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function C(aA1) { return 3.0 * aA1; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
C
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function calcBezier(aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
calcBezier
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function getSlope(aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
getSlope
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function newtonRaphsonIterate(aX, aGuessT) { for (var _i = 0; _i < NEWTON_ITERATIONS; ++_i) { var currentSlope = getSlope(aGuessT, mX1, mX2); if (currentSlope === 0.0) { return aGuessT; } var currentX = calcBezier(aGuessT, mX1, mX2) - aX; aGuessT -= currentX / currentSlope; } return aGuessT; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
newtonRaphsonIterate
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function calcSampleValues() { for (var _i2 = 0; _i2 < kSplineTableSize; ++_i2) { mSampleValues[_i2] = calcBezier(_i2 * kSampleStepSize, mX1, mX2); } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
calcSampleValues
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function binarySubdivide(aX, aA, aB) { var currentX, currentT, i = 0; do { currentT = aA + (aB - aA) / 2.0; currentX = calcBezier(currentT, mX1, mX2) - aX; if (currentX > 0.0) { aB = currentT; } else { aA = currentT; } } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS); return currentT; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
binarySubdivide
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function getTForX(aX) { var intervalStart = 0.0, currentSample = 1, lastSample = kSplineTableSize - 1; for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) { intervalStart += kSampleStepSize; } --currentSample; var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]), guessForT = intervalStart + dist * kSampleStepSize, initialSlope = getSlope(guessForT, mX1, mX2); if (initialSlope >= NEWTON_MIN_SLOPE) { return newtonRaphsonIterate(aX, guessForT); } else if (initialSlope === 0.0) { return guessForT; } else { return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize); } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
getTForX
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function precompute() { _precomputed = true; if (mX1 !== mY1 || mX2 !== mY2) { calcSampleValues(); } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
precompute
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
f = function f(aX) { if (!_precomputed) { precompute(); } if (mX1 === mY1 && mX2 === mY2) { return aX; } if (aX === 0) { return 0; } if (aX === 1) { return 1; } return calcBezier(getTForX(aX), mY1, mY2); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
f
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function springAccelerationForState(state) { return -state.tension * state.x - state.friction * state.v; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
springAccelerationForState
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function springEvaluateStateWithDerivative(initialState, dt, derivative) { var state = { x: initialState.x + derivative.dx * dt, v: initialState.v + derivative.dv * dt, tension: initialState.tension, friction: initialState.friction }; return { dx: state.v, dv: springAccelerationForState(state) }; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
springEvaluateStateWithDerivative
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function springIntegrateState(state, dt) { var a = { dx: state.v, dv: springAccelerationForState(state) }, b = springEvaluateStateWithDerivative(state, dt * 0.5, a), c = springEvaluateStateWithDerivative(state, dt * 0.5, b), d = springEvaluateStateWithDerivative(state, dt, c), dxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx), dvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv); state.x = state.x + dxdt * dt; state.v = state.v + dvdt * dt; return state; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
springIntegrateState
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
cubicBezier = function cubicBezier(t1, p1, t2, p2) { var bezier = generateCubicBezier(t1, p1, t2, p2); return function (start, end, percent) { return start + (end - start) * bezier(percent); }; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
cubicBezier
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function getEasedValue(type, start, end, percent, easingFn) { if (percent === 1) { return end; } if (start === end) { return end; } var val = easingFn(start, end, percent); if (type == null) { return val; } if (type.roundValue || type.color) { val = Math.round(val); } if (type.min !== undefined) { val = Math.max(val, type.min); } if (type.max !== undefined) { val = Math.min(val, type.max); } return val; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
getEasedValue
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function getValue(prop, spec) { if (prop.pfValue != null || prop.value != null) { if (prop.pfValue != null && (spec == null || spec.type.units !== '%')) { return prop.pfValue; } else { return prop.value; } } else { return prop; } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
getValue
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function ease(startProp, endProp, percent, easingFn, propSpec) { var type = propSpec != null ? propSpec.type : null; if (percent < 0) { percent = 0; } else if (percent > 1) { percent = 1; } var start = getValue(startProp, propSpec); var end = getValue(endProp, propSpec); if (number(start) && number(end)) { return getEasedValue(type, start, end, percent, easingFn); } else if (array(start) && array(end)) { var easedArr = []; for (var i = 0; i < end.length; i++) { var si = start[i]; var ei = end[i]; if (si != null && ei != null) { var val = getEasedValue(type, si, ei, percent, easingFn); easedArr.push(val); } else { easedArr.push(ei); } } return easedArr; } return undefined; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
ease
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function step(self, ani, now, isCore) { var isEles = !isCore; var _p = self._private; var ani_p = ani._private; var pEasing = ani_p.easing; var startTime = ani_p.startTime; var cy = isCore ? self : self.cy(); var style = cy.style(); if (!ani_p.easingImpl) { if (pEasing == null) { // use default ani_p.easingImpl = easings['linear']; } else { // then define w/ name var easingVals; if (string(pEasing)) { var easingProp = style.parse('transition-timing-function', pEasing); easingVals = easingProp.value; } else { // then assume preparsed array easingVals = pEasing; } var name, args; if (string(easingVals)) { name = easingVals; args = []; } else { name = easingVals[1]; args = easingVals.slice(2).map(function (n) { return +n; }); } if (args.length > 0) { // create with args if (name === 'spring') { args.push(ani_p.duration); // need duration to generate spring } ani_p.easingImpl = easings[name].apply(null, args); } else { // static impl by name ani_p.easingImpl = easings[name]; } } } var easing = ani_p.easingImpl; var percent; if (ani_p.duration === 0) { percent = 1; } else { percent = (now - startTime) / ani_p.duration; } if (ani_p.applying) { percent = ani_p.progress; } if (percent < 0) { percent = 0; } else if (percent > 1) { percent = 1; } if (ani_p.delay == null) { // then update var startPos = ani_p.startPosition; var endPos = ani_p.position; if (endPos && isEles && !self.locked()) { var newPos = {}; if (valid(startPos.x, endPos.x)) { newPos.x = ease(startPos.x, endPos.x, percent, easing); } if (valid(startPos.y, endPos.y)) { newPos.y = ease(startPos.y, endPos.y, percent, easing); } self.position(newPos); } var startPan = ani_p.startPan; var endPan = ani_p.pan; var pan = _p.pan; var animatingPan = endPan != null && isCore; if (animatingPan) { if (valid(startPan.x, endPan.x)) { pan.x = ease(startPan.x, endPan.x, percent, easing); } if (valid(startPan.y, endPan.y)) { pan.y = ease(startPan.y, endPan.y, percent, easing); } self.emit('pan'); } var startZoom = ani_p.startZoom; var endZoom = ani_p.zoom; var animatingZoom = endZoom != null && isCore; if (animatingZoom) { if (valid(startZoom, endZoom)) { _p.zoom = bound(_p.minZoom, ease(startZoom, endZoom, percent, easing), _p.maxZoom); } self.emit('zoom'); } if (animatingPan || animatingZoom) { self.emit('viewport'); } var props = ani_p.style; if (props && props.length > 0 && isEles) { for (var i = 0; i < props.length; i++) { var prop = props[i]; var _name = prop.name; var end = prop; var start = ani_p.startStyle[_name]; var propSpec = style.properties[start.name]; var easedVal = ease(start, end, percent, easing, propSpec); style.overrideBypass(self, _name, easedVal); } // for props self.emit('style'); } // if } ani_p.progress = percent; return percent; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
step
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function valid(start, end) { if (start == null || end == null) { return false; } if (number(start) && number(end)) { return true; } else if (start && end) { return true; } return false; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
valid
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function startAnimation(self, ani, now, isCore) { var ani_p = ani._private; ani_p.started = true; ani_p.startTime = now - ani_p.progress * ani_p.duration; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
startAnimation
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function stepAll(now, cy) { var eles = cy._private.aniEles; var doneEles = []; function stepOne(ele, isCore) { var _p = ele._private; var current = _p.animation.current; var queue = _p.animation.queue; var ranAnis = false; // if nothing currently animating, get something from the queue if (current.length === 0) { var next = queue.shift(); if (next) { current.push(next); } } var callbacks = function callbacks(_callbacks) { for (var j = _callbacks.length - 1; j >= 0; j--) { var cb = _callbacks[j]; cb(); } _callbacks.splice(0, _callbacks.length); }; // step and remove if done for (var i = current.length - 1; i >= 0; i--) { var ani = current[i]; var ani_p = ani._private; if (ani_p.stopped) { current.splice(i, 1); ani_p.hooked = false; ani_p.playing = false; ani_p.started = false; callbacks(ani_p.frames); continue; } if (!ani_p.playing && !ani_p.applying) { continue; } // an apply() while playing shouldn't do anything if (ani_p.playing && ani_p.applying) { ani_p.applying = false; } if (!ani_p.started) { startAnimation(ele, ani, now); } step(ele, ani, now, isCore); if (ani_p.applying) { ani_p.applying = false; } callbacks(ani_p.frames); if (ani_p.step != null) { ani_p.step(now); } if (ani.completed()) { current.splice(i, 1); ani_p.hooked = false; ani_p.playing = false; ani_p.started = false; callbacks(ani_p.completes); } ranAnis = true; } if (!isCore && current.length === 0 && queue.length === 0) { doneEles.push(ele); } return ranAnis; } // stepElement // handle all eles var ranEleAni = false; for (var e = 0; e < eles.length; e++) { var ele = eles[e]; var handledThisEle = stepOne(ele); ranEleAni = ranEleAni || handledThisEle; } // each element var ranCoreAni = stepOne(cy, true); // notify renderer if (ranEleAni || ranCoreAni) { if (eles.length > 0) { cy.notify('draw', eles); } else { cy.notify('draw'); } } // remove elements from list of currently animating if its queues are empty eles.unmerge(doneEles); cy.emit('step'); } // stepAll
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
stepAll
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function stepOne(ele, isCore) { var _p = ele._private; var current = _p.animation.current; var queue = _p.animation.queue; var ranAnis = false; // if nothing currently animating, get something from the queue if (current.length === 0) { var next = queue.shift(); if (next) { current.push(next); } } var callbacks = function callbacks(_callbacks) { for (var j = _callbacks.length - 1; j >= 0; j--) { var cb = _callbacks[j]; cb(); } _callbacks.splice(0, _callbacks.length); }; // step and remove if done for (var i = current.length - 1; i >= 0; i--) { var ani = current[i]; var ani_p = ani._private; if (ani_p.stopped) { current.splice(i, 1); ani_p.hooked = false; ani_p.playing = false; ani_p.started = false; callbacks(ani_p.frames); continue; } if (!ani_p.playing && !ani_p.applying) { continue; } // an apply() while playing shouldn't do anything if (ani_p.playing && ani_p.applying) { ani_p.applying = false; } if (!ani_p.started) { startAnimation(ele, ani, now); } step(ele, ani, now, isCore); if (ani_p.applying) { ani_p.applying = false; } callbacks(ani_p.frames); if (ani_p.step != null) { ani_p.step(now); } if (ani.completed()) { current.splice(i, 1); ani_p.hooked = false; ani_p.playing = false; ani_p.started = false; callbacks(ani_p.completes); } ranAnis = true; } if (!isCore && current.length === 0 && queue.length === 0) { doneEles.push(ele); } return ranAnis; } // stepElement
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
stepOne
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
callbacks = function callbacks(_callbacks) { for (var j = _callbacks.length - 1; j >= 0; j--) { var cb = _callbacks[j]; cb(); } _callbacks.splice(0, _callbacks.length); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
callbacks
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function headlessStep() { if (!cy._private.animationsRunning) { return; } requestAnimationFrame(function animationStep(now) { stepAll(now, cy); headlessStep(); }); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
headlessStep
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
argSelector$1 = function argSelector(arg) { if (string(arg)) { return new Selector(arg); } else { return arg; } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
argSelector$1
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
propHash = function propHash(ele, propNames, seedKey) { return self.getPropertiesHash(ele, propNames, seedKey); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
propHash
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
updateGrKey1 = function updateGrKey1(val, grKey) { return _p.styleKeys[grKey][0] = hashInt(val, _p.styleKeys[grKey][0]); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
updateGrKey1
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
updateGrKey2 = function updateGrKey2(val, grKey) { return _p.styleKeys[grKey][1] = hashIntAlt(val, _p.styleKeys[grKey][1]); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
updateGrKey2
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
updateGrKey = function updateGrKey(val, grKey) { updateGrKey1(val, grKey); updateGrKey2(val, grKey); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
updateGrKey
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
updateGrKeyWStr = function updateGrKeyWStr(strVal, grKey) { for (var j = 0; j < strVal.length; j++) { var ch = strVal.charCodeAt(j); updateGrKey1(ch, grKey); updateGrKey2(ch, grKey); } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
updateGrKeyWStr
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
cleanNum = function cleanNum(val) { return -128 < val && val < 128 && Math.floor(val) !== val ? N - (val * 1024 | 0) : val; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
cleanNum
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
getVal = function getVal(p) { if (p == null) { return null; } else if (p.pfValue != null) { return p.pfValue; } else { return p.value; } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
getVal
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
checkTriggers = function checkTriggers() { var fromVal = getVal(origProp); var toVal = getVal(prop); self.checkTriggers(ele, prop.name, fromVal, toVal); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
checkTriggers
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
printMappingErr = function printMappingErr() { warn('Do not assign mappings to elements without corresponding data (i.e. ele `' + ele.id() + '` has no mapping for property `' + prop.name + '` with data field `' + prop.field + '`); try a `[' + prop.field + ']` selector to limit scope to elements with `' + prop.field + '` defined'); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
printMappingErr
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
getRenderedValue = function getRenderedValue(val) { return val * zoom; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
getRenderedValue
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
getValueStringWithUnits = function getValueStringWithUnits(val, units) { return getRenderedValue(val) + units; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
getValueStringWithUnits
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function removeSelAndBlockFromRemaining() { // remove the parsed selector and block from the remaining text to parse if (remaining.length > selAndBlockStr.length) { remaining = remaining.substr(selAndBlockStr.length); } else { remaining = ''; } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
removeSelAndBlockFromRemaining
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
function removePropAndValFromRem() { // remove the parsed property and value from the remaining block text to parse if (blockRem.length > propAndValStr.length) { blockRem = blockRem.substr(propAndValStr.length); } else { blockRem = ''; } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
removePropAndValFromRem
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
data = function data(prefix) { return '^' + prefix + '\\s*\\(\\s*([\\w\\.]+)\\s*\\)$'; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
data
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
mapData = function mapData(prefix) { var mapArg = number + '|\\w+|' + rgba + '|' + hsla + '|' + hex3$1 + '|' + hex6$1; return '^' + prefix + '\\s*\\(([\\w\\.]+)\\s*\\,\\s*(' + number + ')\\s*\\,\\s*(' + number + ')\\s*,\\s*(' + mapArg + ')\\s*\\,\\s*(' + mapArg + ')\\)$'; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
mapData
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
nodeSizeHashOverride = function nodeSizeHashOverride(ele, parsedProp) { if (parsedProp.value === 'label') { return -ele.poolIndex(); // no hash key hits is using label size (hitrate for perf probably low anyway) } else { return parsedProp.pfValue; } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
nodeSizeHashOverride
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
checkEnums = function checkEnums() { for (var _i = 0; _i < type.enums.length; _i++) { var en = type.enums[_i]; if (en === value) { return { name: name, value: value, strValue: '' + value, bypass: propIsBypass }; } } return null; }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
checkEnums
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
Style = function Style(cy) { if (!(this instanceof Style)) { return new Style(cy); } if (!core(cy)) { error('A style must have a core reference'); return; } this._private = { cy: cy, coreStyle: {} }; this.length = 0; this.resetToDefault(); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
Style
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
val = function val(name) { return parseFloat(style.getPropertyValue(name)); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
val
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
Core = function Core(opts) { var cy = this; opts = extend({}, opts); var container = opts.container; // allow for passing a wrapped jquery object // e.g. cytoscape({ container: $('#cy') }) if (container && !htmlElement(container) && htmlElement(container[0])) { container = container[0]; } var reg = container ? container._cyreg : null; // e.g. already registered some info (e.g. readies) via jquery reg = reg || {}; if (reg && reg.cy) { reg.cy.destroy(); reg = {}; // old instance => replace reg completely } var readies = reg.readies = reg.readies || []; if (container) { container._cyreg = reg; } // make sure container assoc'd reg points to this cy reg.cy = cy; var head = window$1 !== undefined && container !== undefined && !opts.headless; var options = opts; options.layout = extend({ name: head ? 'grid' : 'null' }, options.layout); options.renderer = extend({ name: head ? 'canvas' : 'null' }, options.renderer); var defVal = function defVal(def, val, altVal) { if (val !== undefined) { return val; } else if (altVal !== undefined) { return altVal; } else { return def; } }; var _p = this._private = { container: container, // html dom ele container ready: false, // whether ready has been triggered options: options, // cached options elements: new Collection(this), // elements in the graph listeners: [], // list of listeners aniEles: new Collection(this), // elements being animated data: options.data || {}, // data for the core scratch: {}, // scratch object for core layout: null, renderer: null, destroyed: false, // whether destroy was called notificationsEnabled: true, // whether notifications are sent to the renderer minZoom: 1e-50, maxZoom: 1e50, zoomingEnabled: defVal(true, options.zoomingEnabled), userZoomingEnabled: defVal(true, options.userZoomingEnabled), panningEnabled: defVal(true, options.panningEnabled), userPanningEnabled: defVal(true, options.userPanningEnabled), boxSelectionEnabled: defVal(true, options.boxSelectionEnabled), autolock: defVal(false, options.autolock, options.autolockNodes), autoungrabify: defVal(false, options.autoungrabify, options.autoungrabifyNodes), autounselectify: defVal(false, options.autounselectify), styleEnabled: options.styleEnabled === undefined ? head : options.styleEnabled, zoom: number(options.zoom) ? options.zoom : 1, pan: { x: plainObject(options.pan) && number(options.pan.x) ? options.pan.x : 0, y: plainObject(options.pan) && number(options.pan.y) ? options.pan.y : 0 }, animation: { // object for currently-running animations current: [], queue: [] }, hasCompoundNodes: false, multiClickDebounceTime: defVal(250, options.multiClickDebounceTime) }; this.createEmitter(); // set selection type this.selectionType(options.selectionType); // init zoom bounds this.zoomRange({ min: options.minZoom, max: options.maxZoom }); var loadExtData = function loadExtData(extData, next) { var anyIsPromise = extData.some(promise); if (anyIsPromise) { return Promise$1.all(extData).then(next); // load all data asynchronously, then exec rest of init } else { next(extData); // exec synchronously for convenience } }; // start with the default stylesheet so we have something before loading an external stylesheet if (_p.styleEnabled) { cy.setStyle([]); } // create the renderer var rendererOptions = extend({}, options, options.renderer); // allow rendering hints in top level options cy.initRenderer(rendererOptions); var setElesAndLayout = function setElesAndLayout(elements, onload, ondone) { cy.notifications(false); // remove old elements var oldEles = cy.mutableElements(); if (oldEles.length > 0) { oldEles.remove(); } if (elements != null) { if (plainObject(elements) || array(elements)) { cy.add(elements); } } cy.one('layoutready', function (e) { cy.notifications(true); cy.emit(e); // we missed this event by turning notifications off, so pass it on cy.one('load', onload); cy.emitAndNotify('load'); }).one('layoutstop', function () { cy.one('done', ondone); cy.emit('done'); }); var layoutOpts = extend({}, cy._private.options.layout); layoutOpts.eles = cy.elements(); cy.layout(layoutOpts).run(); }; loadExtData([options.style, options.elements], function (thens) { var initStyle = thens[0]; var initEles = thens[1]; // init style if (_p.styleEnabled) { cy.style().append(initStyle); } // initial load setElesAndLayout(initEles, function () { // onready cy.startAnimationLoop(); _p.ready = true; // if a ready callback is specified as an option, the bind it if (fn(options.ready)) { cy.on('ready', options.ready); } // bind all the ready handlers registered before creating this instance for (var i = 0; i < readies.length; i++) { var fn$1 = readies[i]; cy.on('ready', fn$1); } if (reg) { reg.readies = []; } // clear b/c we've bound them all and don't want to keep it around in case a new core uses the same div etc cy.emit('ready'); }, options.done); }); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
Core
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
defVal = function defVal(def, val, altVal) { if (val !== undefined) { return val; } else if (altVal !== undefined) { return altVal; } else { return def; } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
defVal
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
loadExtData = function loadExtData(extData, next) { var anyIsPromise = extData.some(promise); if (anyIsPromise) { return Promise$1.all(extData).then(next); // load all data asynchronously, then exec rest of init } else { next(extData); // exec synchronously for convenience } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
loadExtData
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
setElesAndLayout = function setElesAndLayout(elements, onload, ondone) { cy.notifications(false); // remove old elements var oldEles = cy.mutableElements(); if (oldEles.length > 0) { oldEles.remove(); } if (elements != null) { if (plainObject(elements) || array(elements)) { cy.add(elements); } } cy.one('layoutready', function (e) { cy.notifications(true); cy.emit(e); // we missed this event by turning notifications off, so pass it on cy.one('load', onload); cy.emitAndNotify('load'); }).one('layoutstop', function () { cy.one('done', ondone); cy.emit('done'); }); var layoutOpts = extend({}, cy._private.options.layout); layoutOpts.eles = cy.elements(); cy.layout(layoutOpts).run(); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
setElesAndLayout
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
getFreshRef = function getFreshRef(ele) { return cy.getElementById(ele.id()); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
getFreshRef
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
updateEles = function updateEles(jsons, gr) { var toAdd = []; var toMod = []; for (var i = 0; i < jsons.length; i++) { var json = jsons[i]; if (!json.data.id) { warn('cy.json() cannot handle elements without an ID attribute'); continue; } var id = '' + json.data.id; // id must be string var ele = cy.getElementById(id); idInJson[id] = true; if (ele.length !== 0) { // existing element should be updated toMod.push({ ele: ele, json: json }); } else { // otherwise should be added if (gr) { json.group = gr; toAdd.push(json); } else { toAdd.push(json); } } } cy.add(toAdd); for (var _i = 0; _i < toMod.length; _i++) { var _toMod$_i = toMod[_i], _ele = _toMod$_i.ele, _json = _toMod$_i.json; _ele.json(_json); } }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
updateEles
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT
getInfo = function getInfo(ele) { return ele.scratch('breadthfirst'); }
Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), and z-index (low to high). These styles affect how this applies: z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the same depth as the root of the compound graph, followed by the default value `auto` which draws in order from root to leaves of the compound graph. The last drawn is `top`. z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. `manual` ignores this convention and draws based on the `z-index` value setting. z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher `z-index` will be drawn on top of an element with a lower `z-index`.
getInfo
javascript
pistazie/cdk-dia
src/render/cytoscape/base/js/app.8e9fe77f.js
https://github.com/pistazie/cdk-dia/blob/master/src/render/cytoscape/base/js/app.8e9fe77f.js
MIT