[etoys-dev] Etoys: MorphicExtras-bf.16.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Sep 13 11:24:26 EDT 2010
Bert Freudenberg uploaded a new version of MorphicExtras to project Etoys:
http://source.squeak.org/etoys/MorphicExtras-bf.16.mcz
==================== Summary ====================
Name: MorphicExtras-bf.16
Author: bf
Time: 13 September 2010, 5:24:05 pm
UUID: 45b35a8f-649d-4035-ae68-b351041c8ea3
Ancestors: MorphicExtras-bf.15
remove send of repositionPaintPalette:
=============== Diff against MorphicExtras-bf.15 ===============
Item was changed:
----- Method: SketchEditorMorph>>initializeFor:inBounds:pasteUpMorph: (in category 'initialization') -----
initializeFor: aSketchMorph inBounds: boundsToUse pasteUpMorph: aPasteUpMorph
"Initialize the receiver to edit the given sketchMorph in the given bounds, with the resulting object to reside in the given pasteUpMorph."
| aPaintBox newPaintBoxBounds worldBounds requiredWidth newOrigin aPosition aPal aTab paintBoxFullBounds |
(aTab _ self world paintingFlapTab) ifNotNil:
[aTab showFlap.
^ self initializeFor: aSketchMorph inBounds: boundsToUse pasteUpMorph: aPasteUpMorph paintBoxPosition: nil].
self setProperty: #recipientPasteUp toValue: aPasteUpMorph.
aPaintBox _ self world paintBox.
worldBounds _ self world bounds.
requiredWidth _ aPaintBox width.
aPosition _ (aPal _ aPasteUpMorph standardPalette)
ifNotNil:
[aPal showNoPalette.
aPal topRight + (aPaintBox width negated @ 0 "aPal tabsMorph height")]
ifNil:
[boundsToUse topRight].
newOrigin _ ((aPosition x + requiredWidth <= worldBounds right) or: [Preferences unlimitedPaintArea])
ifTrue: "will fit to right of aPasteUpMorph"
[aPosition]
ifFalse: "won't fit to right, try left"
[boundsToUse topLeft - (requiredWidth @ 0)].
paintBoxFullBounds _ aPaintBox maxBounds.
paintBoxFullBounds _ (newOrigin - aPaintBox offsetFromMaxBounds) extent:
paintBoxFullBounds extent.
newPaintBoxBounds _ paintBoxFullBounds translatedToBeWithin: worldBounds.
self initializeFor: aSketchMorph inBounds: boundsToUse
pasteUpMorph: aPasteUpMorph
paintBoxPosition: newPaintBoxBounds origin + aPaintBox offsetFromMaxBounds.
+ !
-
- aPasteUpMorph repositionPaintPalette: palette. "For hdlt"!
More information about the etoys-dev
mailing list