Comment #12 on issue 888 by tu...@tudorgirba.com: MondrianViewBuilder should support a better zOrder http://code.google.com/p/moose-technology/issues/detail?id=888
Started to read the code:
- I like it that the sorting happens in place in ROView. I just think I would have put it in ZOrdering, though.
- What is the reason for not allowing the changing of zOrdering if elements already exist? zOrdering: aZOrdering elementsToRender notEmpty ifTrue: [ self error: 'Cannot change the zOrdering if elements are present' ]. elementsToRender := SortedCollection sortBlock: [ :a :b | a zIndex < b zIndex ]. zOrdering := aZOrdering
I see no reason why we could not apply the sorting to existing elements if wanted.
- I think ZOrdering>>at: integerOrValue put: aBlockOrAValue is confusing. I would give it a more explicit name.
- The default ZOrdering from ROMondrianViewBuilder is good now. It makes a big difference.