Is there a way to ask Mondrian to redraw itself when the structure of nodes has changed.
I have a view with some options. When an option is activated, it actually adds new nodes to the view, hence the layout needs to be computed again. I tried 'view updateWindow' but it does not work. -- Simon _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
On 01 Jul 2010, at 12:22, Simon Denier wrote: > Is there a way to ask Mondrian to redraw itself when the structure of nodes has changed. > > I have a view with some options. When an option is activated, it actually adds new nodes to the view, hence the layout needs to be computed again. > > I tried 'view updateWindow' but it does not work. Yes, AspectMaps does that on each structural zoom action to redraw the contents of a node. The code I have is as follows: aView forNode: (...the node...) do: [(...the mondrian script for the inside of the node ...)] aView root allEdgesDo: #resetCache; applyLayout. aView updateWindow. -- Johan Fabry [hidden email] - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
On 1 juil. 2010, at 18:40, Johan Fabry wrote: > > On 01 Jul 2010, at 12:22, Simon Denier wrote: > >> Is there a way to ask Mondrian to redraw itself when the structure of nodes has changed. >> >> I have a view with some options. When an option is activated, it actually adds new nodes to the view, hence the layout needs to be computed again. >> >> I tried 'view updateWindow' but it does not work. > > > Yes, AspectMaps does that on each structural zoom action to redraw the contents of a node. The code I have is as follows: > > aView forNode: (...the node...) do: [(...the mondrian script for the inside of the node ...)] > aView root allEdgesDo: #resetCache; applyLayout. > aView updateWindow. OK, I thought you were doing it the glamour way. It's really cumbersome to make it work in my case due to the structure of the viz. At best I got two views, the new one and the old one side by side. All I need is simply to tell the view to redraw itself from scratch. I guess need a Mondrian guru. -- Simon _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi Simon,
> It's really cumbersome to make it work in my case due to the structure of the viz. At best I got two views, the new one and the old one side by side. Ok. I added a removeNode: method in MOViewRenderer. Have a look at testRemoveNodesAndEdges > All I need is simply to tell the view to redraw itself from scratch. I guess need a Mondrian guru. Johan expressed some time ago the same wish. If you want to execute the visualization script, then I recommend to create a new MOCanvas. You can have a look at MOEasel>>generate. Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
But I think that simon does not want to open a new canvas just force system to redraw.
On Jul 7, 2010, at 4:36 PM, Alexandre Bergel wrote: > Hi Simon, > >> It's really cumbersome to make it work in my case due to the structure of the viz. At best I got two views, the new one and the old one side by side. > > Ok. I added a removeNode: method in MOViewRenderer. > Have a look at testRemoveNodesAndEdges > >> All I need is simply to tell the view to redraw itself from scratch. I guess need a Mondrian guru. > > Johan expressed some time ago the same wish. If you want to execute the visualization script, then I recommend to create a new MOCanvas. You can have a look at MOEasel>>generate. > > Cheers, > Alexandre > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
> But I think that simon does not want to open a new canvas just force system to redraw.
When one press 'generate' in an easel, a new canvas is created. The visualization is defined by means of side effect in the view, done with primitives like #nodes: #nodes:forEach: #edges:from:to: If one wants to recreate the view, then these methods have to be executed again. In the easel, we evaluate the text entered by the user. Alexandre > On Jul 7, 2010, at 4:36 PM, Alexandre Bergel wrote: > >> Hi Simon, >> >>> It's really cumbersome to make it work in my case due to the structure of the viz. At best I got two views, the new one and the old one side by side. >> >> Ok. I added a removeNode: method in MOViewRenderer. >> Have a look at testRemoveNodesAndEdges >> >>> All I need is simply to tell the view to redraw itself from scratch. I guess need a Mondrian guru. >> >> Johan expressed some time ago the same wish. If you want to execute the visualization script, then I recommend to create a new MOCanvas. You can have a look at MOEasel>>generate. >> >> Cheers, >> Alexandre >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |