Closed GoogleCodeExporter closed 9 years ago
Taking owernship.
Original comment by kevin.a....@gmail.com
on 29 Jan 2012 at 8:14
I'm having troubles figuring how ModelTab.java and graphhandler.js speak to
each other. When the "View Paths" button is clicked in ModelTab.java, how do I
make graphhandler.js aware of this so that I can change the bg/border colors?
Original comment by kevin.a....@gmail.com
on 29 Jan 2012 at 9:38
The communication pattern between ModelTab.java and graphhandler.js has been
primarily one-way -- graphhandler.js events trigger method calls in ModelTab
(e.g., like when a node is clicked). Window resize is a good example of going
in the other direction -- ModelGraphic.java is the Java/JS interface and
contains a resizeGraph() JSNI method, which is used for re-rendering the
graphic.
I think the way to approach this issue is to create new JSNI methods in
ModelGraphic that can update a border for some arbitrary graphic node to an
arbitrary color, all in JS. Then call this method from ModelTab with
appropriate arguments.
Original comment by bestchai
on 29 Jan 2012 at 5:39
For scenario 2, I think for a single click on a node, the bgcolor should be
blue along with a red border. It doesn't make sense to make the bgcolor pink
because that node is technically part of the shift-click node set.
Original comment by kevin.a....@gmail.com
on 30 Jan 2012 at 7:44
I think what I meant to say is that we should change the single click behavior
to not add the clicked node to the shift-click node set. Which is why the
node's bgcolor shouldn't be blue. I would like for the single click to be
entirely independent of the shift-click, as these are completely orthogonal
operations.
Original comment by bestchai
on 30 Jan 2012 at 8:16
Solution in revision 6a0a829b9ecb, please review.
Original comment by kevin.a....@gmail.com
on 30 Jan 2012 at 9:23
One small bug with this solution - the red border does does not disappear if
the single click node is not included in the shift-click set, and view paths is
clicked.
As a result, you get something that looks like the attached model, with both
red and blue border nodes. There should only be one kind of border color shown
at any one time.
Original comment by bestchai
on 30 Jan 2012 at 5:25
Attachments:
Fixed bug in revision de7bade5a3e5, please review.
Original comment by kevin.a....@gmail.com
on 30 Jan 2012 at 11:21
Ok, the red border is no longer there when paths are shown, but the blue border
is now also gone for the node that is both clicked and in the shift-click set.
That is, if a node is clicked, and shift-clicked. If view-paths is then
clicked, the node's border should be blue. Instead, the current code doesn't
give it any border.
Original comment by bestchai
on 31 Jan 2012 at 12:50
[deleted comment]
Bug fix in revision 6e674e15175f, please review.
Original comment by kevin.a....@gmail.com
on 31 Jan 2012 at 1:58
Merged into default with revision 39d38d463cda
Original comment by bestchai
on 31 Jan 2012 at 3:03
Original issue reported on code.google.com by
bestchai
on 25 Jan 2012 at 4:15