Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 501 by alexandr...(a)gmail.com: Cache independence
http://code.google.com/p/moose-technology/issues/detail?id=501
The core of Mondrian is not independent of the cache implementation. The
logic of Mondrian rely on the cache to implement its semantics. This is
obviously wrong.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
bounds
"Answer the bounds of the receiver."
"the bounds is has an absolute origin"
"Note that the bounds computed above, may have (and it is likely to) a
different origin. The reason is that the layout is in charge to position
the nodes properly"
| basicBounds |
boundsCache ifNotNil: [ ^ boundsCache ].
"We check if the shape if present"
self shapeBoundsAt: self shape ifPresent: [ :b | ^ boundsCache := b ].
basicBounds := self shape computeBoundsFor: self.
self shapeBoundsAt: self shape put: basicBounds.
^ boundsCache := basicBounds
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
translateAbsoluteCacheBy: aPoint
absoluteBoundsCache ifNil: [ ^ self ].
absoluteBoundsCache := absoluteBoundsCache translateBy: aPoint
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thanks to Santiago Vidal for pointing this out!