Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I Added a bunch of new functions #106

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Conversation

dstrack
Copy link

@dstrack dstrack commented Oct 17, 2019

i added various functions and features and like to share them with you!
functions for zooming, dragging of canvas or nodes, load and store positions.
node shapes and shadows, selection effects.
Demo URL:
https://yboieokpjit8ejk-strackdev01.adb.eu-frankfurt-1.oraclecloudapps.com/ords/f?p=2000:28:0

best regards
Dirk

added parameter fontsize, scaleFactor, zoomFactor
added load node position from user data
changed constant for avoid massive forces at small distances
added function getNodePositions
changed requestAnimationFrame to use function from window instead of this
added function findNode
added function getCanvasPos
added function getNodePositions
added parameter fontsize, zoomFactor, maxSpeed, nodePositions, pinWeight, edgeLabelBoxes, selected, x_offset, y_offset
added node shadows
added node shapes
added zoom canvas, drag canvas, zoom nodes, drag & pin nodes.
added function zoom
added function trackTransforms
added function getCanvasPos
@dstrack dstrack changed the title I Added new a bunch of functions I Added a bunch of new functions Oct 17, 2019
… moved assignments; use of const and let for loop variables.
…ing on pinWeight

added functions selectNode, isSelectedNode, isSelectedEdge, setNodeProperties
…mbsLaw, applyHookesLaw and render.

added functions zoomCanvas, scaleZoomFactor.
setExciteMethod,	-- set method for smart selection - none, downstream, upstream, connected
propagateExcitement -- smart selection of related nodes

improved functions:
applyCoulombsLaw 	-- Boosted method 2 - loops variables are transformed into static memory array addresses
…l line width.

feature - new param.exciteMethod -- set method for smart selection: none, downstream, upstream, connected
- new function setParameter
- added timeout after each frame for Safari to keep the browser responsive (when ui.js is included)
springyui.js
- inproved look for arrowheads, righttriangle and lefttriangle
- default maxspeed is now 100
	Support for zoom and fontsize
new function optimizeMass
	when nodes have many edges the calculation of forces causes shaking and jumping of the nodes.
	by adding a counter mass equal to the number of edges can stop that errors.
new function focusSelected
	zoom and move the canvas to the selected node.
support for touchpad
	select node
	move node
	move canvas
support for generic double click handler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant