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 |
|---|---|---|---|---|---|---|---|
setInfo = function setInfo(ele, obj) {
return ele.scratch('breadthfirst', obj);
} | 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 th... | setInfo | 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 BreadthFirstLayout(options) {
this.options = extend({}, defaults$9, options);
} | 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 th... | BreadthFirstLayout | 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 comp = components[_i];
var maxDegree = comp.maxDegree(false);
var compRoots = comp.filter(function (ele) {
return ele.degree(false) === maxDegree;
});
roots = roots.add(compRoots);
} | 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 th... | _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 |
addToDepth = function addToDepth(ele, d) {
if (depths[d] == null) {
depths[d] = [];
}
var i = depths[d].length;
depths[d].push(ele);
setInfo(ele, {
index: i,
depth: d
});
} | 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 th... | addToDepth | 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 |
changeDepth = function changeDepth(ele, newDepth) {
var _getInfo = getInfo(ele),
depth = _getInfo.depth,
index = _getInfo.index;
depths[depth][index] = null;
addToDepth(ele, newDepth);
} | 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 th... | changeDepth | 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 |
assignDepthsAt = function assignDepthsAt(i) {
var eles = depths[i];
for (var j = 0; j < eles.length; j++) {
var _ele2 = eles[j];
if (_ele2 == null) {
eles.splice(j, 1);
j--;
continue;
}
setInfo(_ele2, {
depth: i,
index: j
});
}
} | 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 th... | assignDepthsAt | 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 |
assignDepths = function assignDepths() {
for (var _i3 = 0; _i3 < depths.length; _i3++) {
assignDepthsAt(_i3);
}
} | 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 th... | assignDepths | 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 |
adjustMaximally = function adjustMaximally(ele, shifted) {
var eInfo = getInfo(ele);
var incomers = ele.incomers().filter(function (el) {
return el.isNode() && eles.has(el);
});
var maxDepth = -1;
var id = ele.id();
for (var k = 0; k < incomers.length; k++) {
var incmr = incomers[k]... | 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 th... | adjustMaximally | 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 |
enqueue = function enqueue(n) {
return Q.push(n);
} | 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 th... | enqueue | 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 |
dequeue = function dequeue() {
return Q.shift();
} | 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 th... | dequeue | 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 |
getWeightedPercent = function getWeightedPercent(ele) {
if (cachedWeightedPercent[ele.id()]) {
return cachedWeightedPercent[ele.id()];
}
var eleDepth = getInfo(ele).depth;
var neighbors = ele.neighborhood();
var percent = 0;
var samples = 0;
for (var _i5 = 0; _i5 < neighbors.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 th... | getWeightedPercent | 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 |
sortFn = function sortFn(a, b) {
var apct = getWeightedPercent(a);
var bpct = getWeightedPercent(b);
var diff = apct - bpct;
if (diff === 0) {
return ascending(a.id(), b.id()); // make sure sort doesn't have don't-care comparisons
} else {
return diff;
}
} | 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 th... | sortFn | 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 |
getPosition = function getPosition(ele) {
var _getInfo2 = getInfo(ele),
depth = _getInfo2.depth,
index = _getInfo2.index;
var depthSize = depths[depth].length;
var distanceX = Math.max(bb.w / ((options.grid ? maxDepthSize : depthSize) + 1), minDistance);
var distanceY = Math.max(bb.h / ... | 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 th... | getPosition | 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 CircleLayout(options) {
this.options = extend({}, defaults$a, options);
} | 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 th... | CircleLayout | 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 |
getPos = function getPos(ele, i) {
var theta = options.startAngle + i * dTheta * (clockwise ? 1 : -1);
var rx = r * Math.cos(theta);
var ry = r * Math.sin(theta);
var pos = {
x: center.x + rx,
y: center.y + ry
};
return pos;
} | 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 th... | getPos | 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 ConcentricLayout(options) {
this.options = extend({}, defaults$b, options);
} | 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 th... | ConcentricLayout | 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 CoseLayout(options) {
this.options = extend({}, defaults$c, options);
this.options.layout = this;
} | @brief : constructor
@arg options : object containing layout options | CoseLayout | 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 |
createLayoutInfo = function createLayoutInfo(cy, layout, options) {
// Shortcut
var edges = options.eles.edges();
var nodes = options.eles.nodes();
var layoutInfo = {
isCompound: cy.hasCompoundNodes(),
layoutNodes: [],
idToIndex: {},
nodeSize: nodes.size(),
graphSet: [],
indexToGraph: []... | @brief : Creates an object which is contains all the data
used in the layout process
@arg cy : cytoscape.js object
@return : layoutInfo object initialized | createLayoutInfo | 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 |
findLCA = function findLCA(node1, node2, layoutInfo) {
// Find their common ancester, starting from the root graph
var res = findLCA_aux(node1, node2, 0, layoutInfo);
if (2 > res.count) {
// If aux function couldn't find the common ancester,
// then it is the root graph
return 0;
} else {
retur... | @brief : This function finds the index of the lowest common
graph ancestor between 2 nodes in the subtree
(from the graph hierarchy induced tree) whose
root is graphIx
@arg node1: node1's ID
@arg node2: node2's ID
@arg layoutInfo: layoutInfo object | findLCA | 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 |
findLCA_aux = function findLCA_aux(node1, node2, graphIx, layoutInfo) {
var graph = layoutInfo.graphSet[graphIx]; // If both nodes belongs to graphIx
if (-1 < graph.indexOf(node1) && -1 < graph.indexOf(node2)) {
return {
count: 2,
graph: graphIx
};
} // Make recursive calls for all subgraphs
... | @brief : Auxiliary function used for LCA computation
@arg node1 : node1's ID
@arg node2 : node2's ID
@arg graphIx : subgraph index
@arg layoutInfo : layoutInfo object
@return : object of the form {count: X, graph: Y}, where:
X is the number of ancesters (max: 2) found i... | findLCA_aux | 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 |
randomizePositions = function randomizePositions(layoutInfo, cy) {
var width = layoutInfo.clientWidth;
var height = layoutInfo.clientHeight;
for (var i = 0; i < layoutInfo.nodeSize; i++) {
var n = layoutInfo.layoutNodes[i]; // No need to randomize compound nodes or locked nodes
if (0 === n.children.leng... | @brief : Randomizes the position of all nodes | randomizePositions | 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 |
getScaleInBoundsFn = function getScaleInBoundsFn(layoutInfo, options, nodes) {
var bb = layoutInfo.boundingBox;
var coseBB = {
x1: Infinity,
x2: -Infinity,
y1: Infinity,
y2: -Infinity
};
if (options.boundingBox) {
nodes.forEach(function (node) {
var lnode = layoutInfo.layoutNodes[layo... | @brief : Randomizes the position of all nodes | getScaleInBoundsFn | 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 |
refreshPositions = function refreshPositions(layoutInfo, cy, options) {
// var s = 'Refreshing positions';
// logDebug(s);
var layout = options.layout;
var nodes = options.eles.nodes();
var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes);
nodes.positions(getScaledPos); // Trigger layoutReady o... | @brief : Updates the positions of nodes in the network
@arg layoutInfo : LayoutInfo object
@arg cy : Cytoscape object
@arg options : Layout options | refreshPositions | 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 |
step$1 = function step(layoutInfo, options, _step) {
// var s = "\n\n###############################";
// s += "\nSTEP: " + step;
// s += "\n###############################\n";
// logDebug(s);
// Calculate node repulsions
calculateNodeForces(layoutInfo, options); // Calculate edge forces
calculateEdgeFor... | @brief : Performs one iteration of the physical simulation
@arg layoutInfo : LayoutInfo object already initialized
@arg cy : Cytoscape object
@arg options : Layout options | step$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 |
calculateNodeForces = function calculateNodeForces(layoutInfo, options) {
// Go through each of the graphs in graphSet
// Nodes only repel each other if they belong to the same graph
// var s = 'calculateNodeForces';
// logDebug(s);
for (var i = 0; i < layoutInfo.graphSet.length; i++) {
var graph = layout... | @brief : Computes the node repulsion forces | calculateNodeForces | 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 |
randomDistance = function randomDistance(max) {
return -max + 2 * max * Math.random();
} | @brief : Computes the node repulsion forces | randomDistance | 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 |
nodeRepulsion = function nodeRepulsion(node1, node2, layoutInfo, options) {
// var s = "Node repulsion. Node1: " + node1.id + " Node2: " + node2.id;
var cmptId1 = node1.cmptId;
var cmptId2 = node2.cmptId;
if (cmptId1 !== cmptId2 && !layoutInfo.isCompound) {
return;
} // Get direction of line connecting b... | @brief : Compute the node repulsion forces between a pair of nodes | nodeRepulsion | 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 |
nodesOverlap = function nodesOverlap(node1, node2, dX, dY) {
if (dX > 0) {
var overlapX = node1.maxX - node2.minX;
} else {
var overlapX = node2.maxX - node1.minX;
}
if (dY > 0) {
var overlapY = node1.maxY - node2.minY;
} else {
var overlapY = node2.maxY - node1.minY;
}
if (overlapX >= 0... | @brief : Determines whether two nodes overlap or not
@return : Amount of overlapping (0 => no overlap) | nodesOverlap | 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 |
findClippingPoint = function findClippingPoint(node, dX, dY) {
// Shorcuts
var X = node.positionX;
var Y = node.positionY;
var H = node.height || 1;
var W = node.width || 1;
var dirSlope = dY / dX;
var nodeSlope = H / W; // var s = 'Computing clipping point of node ' + node.id +
// " . Height: " + H ... | @brief : Finds the point in which an edge (direction dX, dY) intersects
the rectangular bounding box of it's source/target node | findClippingPoint | 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 |
calculateGravityForces = function calculateGravityForces(layoutInfo, options) {
if (options.gravity === 0) {
return;
}
var distThreshold = 1; // var s = 'calculateGravityForces';
// logDebug(s);
for (var i = 0; i < layoutInfo.graphSet.length; i++) {
var graph = layoutInfo.graphSet[i];
var numNod... | @brief : Computes gravity forces for all nodes | calculateGravityForces | 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 |
propagateForces = function propagateForces(layoutInfo, options) {
// Inline implementation of a queue, used for traversing the graph in BFS order
var queue = [];
var start = 0; // Points to the start the queue
var end = -1; // Points to the end of the queue
// logDebug('propagateForces');
// Start by visit... | @brief : This function propagates the existing offsets from
parent nodes to its descendents.
@arg layoutInfo : layoutInfo Object
@arg cy : cytoscape Object
@arg options : Layout options | propagateForces | 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 |
updatePositions = function updatePositions(layoutInfo, options) {
// var s = 'Updating positions';
// logDebug(s);
// Reset boundaries for compound nodes
for (var i = 0; i < layoutInfo.nodeSize; i++) {
var n = layoutInfo.layoutNodes[i];
if (0 < n.children.length) {
// logDebug("Resetting boundari... | @brief : Updates the layout model positions, based on
the accumulated forces | updatePositions | 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 |
updateAncestryBoundaries = function updateAncestryBoundaries(node, layoutInfo) {
// var s = "Propagating new position/size of node " + node.id;
var parentId = node.parentId;
if (null == parentId) {
// If there's no parent, we are done
// s += ". No parent node.";
// logDebug(s);
return;
} // Ge... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | updateAncestryBoundaries | 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 |
separateComponents = function separateComponents(layoutInfo, options) {
var nodes = layoutInfo.layoutNodes;
var components = [];
for (var i = 0; i < nodes.length; i++) {
var node = nodes[i];
var cid = node.cmptId;
var component = components[cid] = components[cid] || [];
component.push(node);
}
... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | separateComponents | 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 GridLayout(options) {
this.options = extend({}, defaults$d, options);
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | GridLayout | 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 |
small = function small(val) {
if (val == null) {
return Math.min(rows, cols);
} else {
var min = Math.min(rows, cols);
if (min == rows) {
rows = val;
} else {
cols = val;
}
}
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | small | 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 |
large = function large(val) {
if (val == null) {
return Math.max(rows, cols);
} else {
var max = Math.max(rows, cols);
if (max == rows) {
rows = val;
} else {
cols = val;
}
}
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | large | 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 |
used = function used(row, col) {
return cellUsed['c-' + row + '-' + col] ? true : false;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | used | 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 |
use = function use(row, col) {
cellUsed['c-' + row + '-' + col] = true;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | use | 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 |
moveToNextCell = function moveToNextCell() {
col++;
if (col >= cols) {
col = 0;
row++;
}
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | moveToNextCell | 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 |
getPos = function getPos(element, i) {
var x, y;
if (element.locked() || element.isParent()) {
return false;
} // see if we have a manual position set
var rcPos = id2manPos[element.id()];
if (rcPos) {
x = rcPos.col * cellWidth + cellWidth / 2 + bb.x1;
y = rcPos.... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | getPos | 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 NullLayout(options) {
this.options = extend({}, defaults$e, options);
} // runs the layout | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | NullLayout | 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 PresetLayout(options) {
this.options = extend({}, defaults$f, options);
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | PresetLayout | 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 getPosition(node) {
if (options.positions == null) {
return copyPosition(node.position());
}
if (posIsFn) {
return options.positions(node);
}
var pos = options.positions[node._private.data.id];
if (pos == null) {
return null;
}
return pos;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | getPosition | 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 RandomLayout(options) {
this.options = extend({}, defaults$g, options);
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | RandomLayout | 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 |
getPos = function getPos(node, i) {
return {
x: bb.x1 + Math.round(Math.random() * bb.w),
y: bb.y1 + Math.round(Math.random() * bb.h)
};
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | getPos | 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 NullRenderer(options) {
this.options = options;
this.notifications = 0; // for testing
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | NullRenderer | 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 |
throwImgErr = function throwImgErr() {
throw new Error('A headless instance can not render images');
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | throwImgErr | 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 |
bbCollide = function bbCollide(x, y, size, angle, translation, edgeWidth, padding) {
var x1 = translation.x - size / 2 - padding;
var x2 = translation.x + size / 2 + padding;
var y1 = translation.y - size / 2 - padding;
var y2 = translation.y + size / 2 + padding;
var inside = x1 <= x && x <= x2 && ... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | bbCollide | 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 |
transform = function transform(x, y, size, angle, translation) {
var xRotated = x * Math.cos(angle) - y * Math.sin(angle);
var yRotated = x * Math.sin(angle) + y * Math.cos(angle);
var xScaled = xRotated * size;
var yScaled = yRotated * size;
var xTranslated = xScaled + translation.x;
var yTrans... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | transform | 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 |
transformPoints = function transformPoints(pts, size, angle, translation) {
var retPts = [];
for (var i = 0; i < pts.length; i += 2) {
var x = pts[i];
var y = pts[i + 1];
retPts.push(transform(x, y, size, angle, translation));
}
return retPts;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | transformPoints | 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 |
pointsToArr = function pointsToArr(pts) {
var ret = [];
for (var i = 0; i < pts.length; i++) {
var p = pts[i];
ret.push(p.x, p.y);
}
return ret;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | pointsToArr | 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 |
standardGap = function standardGap(edge) {
return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').pfValue * 2;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | standardGap | 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 |
defineArrowShape = function defineArrowShape(name, defn) {
if (string(defn)) {
defn = arrowShapes[defn];
}
arrowShapes[name] = extend({
name: name,
points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3],
collide: function collide(x, y, size, angle, translation, padding) {
... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | defineArrowShape | 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 |
styleValue = function styleValue(name) {
return parseFloat(style.getPropertyValue(name));
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | styleValue | 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 addEle(ele, sqDist) {
if (ele.isNode()) {
if (nearNode) {
return; // can't replace node
} else {
nearNode = ele;
near.push(ele);
}
}
if (ele.isEdge() && (sqDist == null || sqDist < minSqDist)) {
if (nearEdge) {
// then replace existing edge
... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | addEle | 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 checkNode(node) {
var width = node.outerWidth() + 2 * nodeThreshold;
var height = node.outerHeight() + 2 * nodeThreshold;
var hw = width / 2;
var hh = height / 2;
var pos = node.position();
if (pos.x - hw <= x && x <= pos.x + hw // bb check x
&& pos.y - hh <= y && y <= pos.y + hh /... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | checkNode | 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 checkEdge(edge) {
var _p = edge._private;
var rs = _p.rscratch;
var styleWidth = edge.pstyle('width').pfValue;
var scale = edge.pstyle('arrow-scale').value;
var width = styleWidth / 2 + edgeThreshold; // more like a distance radius from centre
var widthSq = width * width;
var width... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | checkEdge | 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 preprop(obj, name, pre) {
return getPrefixedProperty(obj, name, pre);
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | preprop | 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 checkLabel(ele, prefix) {
var _p = ele._private;
var th = labelThreshold;
var prefixDash;
if (prefix) {
prefixDash = prefix + '-';
} else {
prefixDash = '';
}
ele.boundingBox();
var bb = _p.labelBounds[prefix || 'main'];
var text = ele.pstyle(prefixDash + 'labe... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | checkLabel | 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 |
rotate = function rotate(x, y) {
x = x - lx;
y = y - ly;
return {
x: x * cos - y * sin + lx,
y: x * sin + y * cos + ly
};
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | rotate | 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 |
subDWH = function subDWH(dxy, dwh) {
if (dxy > 0) {
return Math.max(dxy - dwh, 0);
} else {
return Math.min(dxy + dwh, 0);
}
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | subDWH | 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 |
getIsTooClose = function getIsTooClose(d) {
return Math.abs(d) < minD || Math.abs(d) >= Math.abs(l);
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | getIsTooClose | 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(p) {
var pairId = pairIds[p];
var pairInfo = hashTable.get(pairId);
var swappedpairInfo = void 0;
if (!pairInfo.hasUnbundled) {
var pllEdges = pairInfo.eles[0].parallelEdges().filter(function (e) {
return e.isBundledBezier();
});
clearArray(pairInfo.eles... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | _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 |
function getPts(pts) {
var retPts = [];
if (pts == null) {
return;
}
for (var i = 0; i < pts.length; i += 2) {
var x = pts[i];
var y = pts[i + 1];
retPts.push({
x: x,
y: y
});
}
return retPts;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | getPts | 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 pushBezierPts(r, edge, pts) {
var qbezierAt$1 = function qbezierAt$1(p1, p2, p3, t) {
return qbezierAt(p1, p2, p3, t);
};
var _p = edge._private;
var bpts = _p.rstyle.bezierPts;
for (var i = 0; i < r.bezierProjPcts.length; i++) {
var p = r.bezierProjPcts[i];
bpts.push({
x: qbezier... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | pushBezierPts | 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 |
qbezierAt$1 = function qbezierAt$1(p1, p2, p3, t) {
return qbezierAt(p1, p2, p3, t);
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | qbezierAt$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 |
lineAngleFromDelta = function lineAngleFromDelta(dx, dy) {
var angle = Math.atan(dy / dx);
if (dx === 0 && angle < 0) {
angle = angle * -1;
}
return angle;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | lineAngleFromDelta | 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 |
lineAngle = function lineAngle(p0, p1) {
var dx = p1.x - p0.x;
var dy = p1.y - p0.y;
return lineAngleFromDelta(dx, dy);
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | lineAngle | 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 |
bezierAngle = function bezierAngle(p0, p1, p2, t) {
var t0 = bound(0, t - 0.001, 1);
var t1 = bound(0, t + 0.001, 1);
var lp0 = qbezierPtAt(p0, p1, p2, t0);
var lp1 = qbezierPtAt(p0, p1, p2, t1);
return lineAngle(lp0, lp1);
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | bezierAngle | 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 |
setRs = function setRs(propName, prefix, value) {
setPrefixedProperty(_p.rscratch, propName, prefix, value);
setPrefixedProperty(_p.rstyle, propName, prefix, value);
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | setRs | 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 |
createControlPointInfo = function createControlPointInfo() {
if (createControlPointInfo.cache) {
return createControlPointInfo.cache;
} // use cache so only 1x per edge
var ctrlpts = []; // store each ctrlpt info init
for (var i = 0; i + 5 < rs.allpts.length; i += 4) {
var p0 = {
... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | createControlPointInfo | 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 addSegment(cp, p0, p1, t0, t1) {
var length = dist(p0, p1);
var prevSegment = cp.segments[cp.segments.length - 1];
var segment = {
p0: p0,
p1: p1,
t0: t0,
t1: t1,
startDist: prevSegment ? prevSegment.startDist + prevSegment.length : 0,
length: l... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | addSegment | 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 |
calculateEndProjection = function calculateEndProjection(prefix) {
var angle;
var isSrc = prefix === 'source';
if (!content[prefix]) {
return;
}
var offset = edge.pstyle(prefix + '-text-offset').pfValue;
switch (rs.edgeType) {
case 'self':
case 'compound':
case 'bezier... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | calculateEndProjection | 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 |
rscratch = function rscratch(propName, value) {
if (value) {
setPrefixedProperty(_p.rscratch, propName, prefix, value);
return value;
} else {
return getPrefixedProperty(_p.rscratch, propName, prefix);
}
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | rscratch | 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 |
enqueue = function enqueue(eles) {
var dirtyStyleCaches = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
elesToUpdate.merge(eles);
if (dirtyStyleCaches) {
for (var i = 0; i < eles.length; i++) {
var ele = eles[i];
var _p = ele._private;
var rstyle = ... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | enqueue | 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 |
updateEleCalcs = function updateEleCalcs(willDraw) {
if (willDraw) {
var fns = r.onUpdateEleCalcsFns; // because we need to have up-to-date style (e.g. stylesheet mappers)
// before calculating rendered style (and pstyle might not be called yet)
elesToUpdate.cleanStyle();
for (var i = 0; i... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | updateEleCalcs | 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 |
isCleanConnected = function isCleanConnected(ele) {
return ele._private.rstyle.cleanConnected;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | isCleanConnected | 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 |
on = function on(event, handler, useCapture) {
var args = Array.prototype.slice.call(arguments);
if (tgtIsDom && r.supportsPassiveEvents) {
// replace useCapture w/ opts obj
args[2] = {
capture: useCapture != null ? useCapture : false,
passive: false,
once: false
};
... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | on | 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 |
isSelected = function isSelected(ele) {
return ele.selected();
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | isSelected | 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 |
triggerEvents = function triggerEvents(target, names, e, position) {
if (target == null) {
target = r.cy;
}
for (var i = 0; i < names.length; i++) {
var name = names[i];
target.emit({
originalEvent: e,
type: name,
position: position
});
}
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | triggerEvents | 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 |
isMultSelKeyDown = function isMultSelKeyDown(e) {
return e.shiftKey || e.metaKey || e.ctrlKey; // maybe e.altKey
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | isMultSelKeyDown | 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 |
allowPanningPassthrough = function allowPanningPassthrough(down, downs) {
var allowPassthrough = true;
if (r.cy.hasCompoundNodes() && down && down.pannable()) {
// a grabbable compound node below the ele => no passthrough panning
for (var i = 0; downs && i < downs.length; i++) {
var down = ... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | allowPanningPassthrough | 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 |
setGrabbed = function setGrabbed(ele) {
ele[0]._private.grabbed = true;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | setGrabbed | 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 |
setFreed = function setFreed(ele) {
ele[0]._private.grabbed = false;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | setFreed | 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 |
setInDragLayer = function setInDragLayer(ele) {
ele[0]._private.rscratch.inDragLayer = true;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | setInDragLayer | 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 |
setOutDragLayer = function setOutDragLayer(ele) {
ele[0]._private.rscratch.inDragLayer = false;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | setOutDragLayer | 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 |
setGrabTarget = function setGrabTarget(ele) {
ele[0]._private.rscratch.isGrabTarget = true;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | setGrabTarget | 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 |
removeGrabTarget = function removeGrabTarget(ele) {
ele[0]._private.rscratch.isGrabTarget = false;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | removeGrabTarget | 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 |
addToDragList = function addToDragList(ele, opts) {
var list = opts.addToList;
var listHasEle = list.has(ele);
if (!listHasEle) {
list.merge(ele);
setGrabbed(ele);
}
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | addToDragList | 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 |
addDescendantsToDrag = function addDescendantsToDrag(node, opts) {
if (!node.cy().hasCompoundNodes()) {
return;
}
if (opts.inDragLayer == null && opts.addToList == null) {
return;
} // nothing to do
var innerNodes = node.descendants();
if (opts.inDragLayer) {
innerNodes.for... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | addDescendantsToDrag | 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 |
addNodesToDrag = function addNodesToDrag(nodes, opts) {
opts = opts || {};
var hasCompoundNodes = nodes.cy().hasCompoundNodes();
if (opts.inDragLayer) {
nodes.forEach(setInDragLayer);
nodes.neighborhood().stdFilter(function (ele) {
return !hasCompoundNodes || ele.isEdge();
}).forE... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | addNodesToDrag | 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 |
freeDraggedElements = function freeDraggedElements(grabbedEles) {
if (!grabbedEles) {
return;
} // just go over all elements rather than doing a bunch of (possibly expensive) traversals
r.getCachedZSortedEles().forEach(function (ele) {
setFreed(ele);
setOutDragLayer(ele);
removeGra... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | freeDraggedElements | 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 |
updateAncestorsInDragLayer = function updateAncestorsInDragLayer(node, opts) {
if (opts.inDragLayer == null && opts.addToList == null) {
return;
} // nothing to do
if (!node.cy().hasCompoundNodes()) {
return;
} // find top-level parent
var parent = node.ancestors().orphans(); // no p... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | updateAncestorsInDragLayer | 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 |
blurActiveDomElement = function blurActiveDomElement() {
if (document.activeElement != null && document.activeElement.blur != null) {
document.activeElement.blur();
}
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | blurActiveDomElement | 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 |
forEachUp = function forEachUp(domEle, fn) {
while (domEle != null) {
fn(domEle);
domEle = domEle.parentNode;
}
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | forEachUp | 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 |
inBoxSelection = function inBoxSelection() {
return r.selection[4] !== 0;
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | inBoxSelection | 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 |
eventInContainer = function eventInContainer(e) {
// save cycles if mouse events aren't to be captured
var containerPageCoords = r.findContainerClientCoords();
var x = containerPageCoords[0];
var y = containerPageCoords[1];
var width = containerPageCoords[2];
var height = containerPageCoords[3];... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | eventInContainer | 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 |
checkForTaphold = function checkForTaphold() {
r.hoverData.tapholdCancelled = false;
clearTimeout(r.hoverData.tapholdTimeout);
r.hoverData.tapholdTimeout = setTimeout(function () {
if (r.hoverData.tapholdCancelled) {
return;
} else {
var ele = r.hoverData.down;
... | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | checkForTaphold | 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 |
makeEvent = function makeEvent(type) {
return {
originalEvent: e,
type: type,
position: {
x: pos[0],
y: pos[1]
}
};
} | @brief : Function used for keeping track of compound node
sizes, since they should bound all their subnodes. | makeEvent | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.