Comments (2)
I was in the process of implementing such a change as well as a general refactoring of the painting functions (including in and out edge painters and selection painter) in order to enable them to also be overridden. Cf. nhelke/scala-force-layout@2b42ea9
I was then in the process of moving the label drawing code to the node painter when I happened upon an issue that will require more consideration. Currently the labels for adjacent nodes are painted in the in and out edge painting functions. Moving them into the node painting function would require quite a few additional optional fields on Node2D
indicating not only whether the node is selected but whether it is an adjacent node on an entering or exiting edge, so that one could potentially change the styling of labels depending on the role of the node in the selection. This strikes me as a sign that a large restructuring might be in order.
I must think more about it. So far the changes I have made do not break the API. Maybe the way to go is to introduce a new completely customisable rendering infrastructure. This may also be an opportunity to enable the customisation of action listeners as well as enabling action listeners on individual nodes.
I would greatly appreciate your input, to make sure I am not veering completely off course.
from scala-force-layout.
Hm. Yes I see your point. Really not sure how to approach it, though (but definitely open to suggestions!) Action listeners on individual nodes would be excellent as well of course!
from scala-force-layout.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scala-force-layout.