'From etoys4.0 of 5 November 2008 [latest update: #2237] on 6 August 2009 at 4:11:51 am'! "Change Set: sketchThumbLoc-sw Date: 11 June 2009 Author: Scott Wallace Version 2: 6 August 2009 -- incorporates Hilaire's suggestion to make the help-message for the collapsed thumbnail be translatable. A simple solution to the issue raised in JIRA SQ-252 'The collapsed sketch should appear below the toolbar, not on top of it."! !SketchMorph methodsFor: 'menus' stamp: 'sw 8/6/2009 04:09'! collapse "Replace the receiver with a collapsed rendition of itself." | priorPosition w collapsedVersion a ht tab | (w _ self world) ifNil: [^self]. collapsedVersion _ (self imageForm scaledToSize: 50@50) asMorph. collapsedVersion setProperty: #uncollapsedMorph toValue: self. collapsedVersion on: #mouseUp send: #uncollapseSketch to: collapsedVersion. collapsedVersion setBalloonText: 'A collapsed version of ' translated, self externalName, '. Click to open it back up.' translated. self delete. w addMorphFront: ( a _ AlignmentMorph newRow hResizing: #shrinkWrap; vResizing: #shrinkWrap; borderWidth: 4; borderColor: Color white; addMorph: collapsedVersion; yourself). a setNameTo: self externalName. ht := (tab := ActiveWorld findA: SugarNavTab) ifNotNil: [tab height] ifNil: [80]. a position: 0@ht. collapsedVersion setProperty: #collapsedMorphCarrier toValue: a. (priorPosition _ self valueOfProperty: #collapsedPosition ifAbsent: [nil]) ifNotNil: [a position: priorPosition]. ! !