3 ms·
Tagging system of Tk's canvas is unmatched in HTML. Pity they (HTML designers) never learn. Basically, in Tk, you can add a tag to an element of your drawing i
by thesz 7y ago
Tagging system of Tk's canvas is unmatched in HTML. Pity they (HTML designers) never learn.
Basically, in Tk, you can add a tag to an element of your drawing in canvas and assign mouse (or keyboard) event handlers to change colors or other attributes on entry and exit of mouse cursor.
I made a OO/relational database schema visualization in Tk, it was breese to navigate - once you hover over a relation, you can see classes highlighted; follow highlighted relation to get to them. And once you highlight class of objects you can see to which relations it belongs.
It tooks two foreach loops to get that behavior. As far as I know, HTML5 canvas does not support that out of the box.
- comex 7y agoHTML canvas indeed doesn’t support hit detection – although SVG does, and you can embed SVG in HTML.