@@ -87,7 +87,7 @@ HatBlockMorph*/
87
87
88
88
// Global stuff ////////////////////////////////////////////////////////
89
89
90
- modules . gui = '2025-March-17 ' ;
90
+ modules . gui = '2025-March-19 ' ;
91
91
92
92
// Declarations
93
93
@@ -12819,6 +12819,7 @@ function StageHandleMorph(target) {
12819
12819
12820
12820
StageHandleMorph . prototype . init = function ( target ) {
12821
12821
this . target = target || null ;
12822
+ this . offset = null ;
12822
12823
this . userState = 'normal' ; // or 'highlight'
12823
12824
HandleMorph . uber . init . call ( this ) ;
12824
12825
this . color = IDE_Morph . prototype . isBright ?
@@ -12897,37 +12898,6 @@ StageHandleMorph.prototype.fixLayout = function () {
12897
12898
if ( ide ) { ide . add ( this ) ; } // come to front
12898
12899
} ;
12899
12900
12900
- // StageHandleMorph stepping:
12901
-
12902
- StageHandleMorph . prototype . step = null ;
12903
-
12904
- StageHandleMorph . prototype . mouseDownLeft = function ( pos ) {
12905
- var world = this . world ( ) ,
12906
- offset = this . right ( ) - pos . x ,
12907
- ide = this . target . parentThatIsA ( IDE_Morph ) ;
12908
-
12909
- if ( ! this . target ) {
12910
- return null ;
12911
- }
12912
- ide . isSmallStage = true ;
12913
- ide . controlBar . stageSizeButton . refresh ( ) ;
12914
-
12915
- this . step = function ( ) {
12916
- var newPos , newWidth ;
12917
- if ( world . hand . mouseButton ) {
12918
- newPos = world . hand . bounds . origin . x + offset ;
12919
- newWidth = this . target . right ( ) - newPos ;
12920
- ide . stageRatio = newWidth / this . target . dimensions . x ;
12921
- ide . setExtent ( world . extent ( ) ) ;
12922
-
12923
- } else {
12924
- this . step = null ;
12925
- ide . isSmallStage = ( ide . stageRatio !== 1 ) ;
12926
- ide . controlBar . stageSizeButton . refresh ( ) ;
12927
- }
12928
- } ;
12929
- } ;
12930
-
12931
12901
// StageHandleMorph events:
12932
12902
12933
12903
StageHandleMorph . prototype . mouseEnter = function ( ) {
@@ -12940,6 +12910,26 @@ StageHandleMorph.prototype.mouseLeave = function () {
12940
12910
this . rerender ( ) ;
12941
12911
} ;
12942
12912
12913
+ StageHandleMorph . prototype . mouseDownLeft = function ( pos ) {
12914
+ var ide = this . target . parentThatIsA ( IDE_Morph ) ;
12915
+ this . offset = this . right ( ) - pos . x ;
12916
+ ide . isSmallStage = true ;
12917
+ ide . controlBar . stageSizeButton . refresh ( ) ;
12918
+ this . lockMouseFocus ( ) ;
12919
+ } ;
12920
+
12921
+ StageHandleMorph . prototype . mouseMove = function ( pos ) {
12922
+ var ide = this . target . parentThatIsA ( IDE_Morph ) ,
12923
+ newPos = pos . x + this . offset ,
12924
+ newWidth = this . target . right ( ) - newPos ;
12925
+ ide . stageRatio = newWidth / this . target . dimensions . x ;
12926
+ if ( ide . isSmallStage !== ( ide . stageRatio !== 1 ) ) {
12927
+ ide . isSmallStage = ( ide . stageRatio !== 1 ) ;
12928
+ ide . controlBar . stageSizeButton . refresh ( ) ;
12929
+ }
12930
+ ide . setExtent ( ide . world ( ) . extent ( ) ) ;
12931
+ } ;
12932
+
12943
12933
StageHandleMorph . prototype . mouseDoubleClick = function ( ) {
12944
12934
this . target . parentThatIsA ( IDE_Morph ) . toggleStageSize ( true , 1 ) ;
12945
12935
} ;
@@ -12963,6 +12953,7 @@ function PaletteHandleMorph(target) {
12963
12953
12964
12954
PaletteHandleMorph . prototype . init = function ( target ) {
12965
12955
this . target = target || null ;
12956
+ this . offset = null ;
12966
12957
this . userState = 'normal' ;
12967
12958
HandleMorph . uber . init . call ( this ) ;
12968
12959
this . color = IDE_Morph . prototype . isBright ?
@@ -12989,40 +12980,6 @@ PaletteHandleMorph.prototype.fixLayout = function () {
12989
12980
if ( ide ) { ide . add ( this ) ; } // come to front
12990
12981
} ;
12991
12982
12992
- // PaletteHandleMorph stepping:
12993
-
12994
- PaletteHandleMorph . prototype . step = null ;
12995
-
12996
- PaletteHandleMorph . prototype . mouseDownLeft = function ( pos ) {
12997
- var world = this . world ( ) ,
12998
- offset = this . right ( ) - pos . x ,
12999
- ide = this . target . parentThatIsA ( IDE_Morph ) ,
13000
- cnf = ide . config ,
13001
- border = cnf . border || 0 ;
13002
-
13003
- if ( ! this . target ) {
13004
- return null ;
13005
- }
13006
- this . step = function ( ) {
13007
- var newPos ;
13008
- if ( world . hand . mouseButton ) {
13009
- newPos = world . hand . bounds . origin . x + offset ;
13010
- ide . paletteWidth = Math . min (
13011
- Math . max (
13012
- 200 , newPos - ide . left ( ) - border * 2 ) ,
13013
- cnf . noSprites ?
13014
- ide . width ( ) - border * 2
13015
- : ide . stageHandle . left ( ) -
13016
- ide . spriteBar . tabBar . width ( )
13017
- ) ;
13018
- ide . setExtent ( world . extent ( ) ) ;
13019
-
13020
- } else {
13021
- this . step = null ;
13022
- }
13023
- } ;
13024
- } ;
13025
-
13026
12983
// PaletteHandleMorph events:
13027
12984
13028
12985
PaletteHandleMorph . prototype . mouseEnter
@@ -13031,6 +12988,27 @@ PaletteHandleMorph.prototype.mouseEnter
13031
12988
PaletteHandleMorph . prototype . mouseLeave
13032
12989
= StageHandleMorph . prototype . mouseLeave ;
13033
12990
12991
+ PaletteHandleMorph . prototype . mouseDownLeft = function ( pos ) {
12992
+ this . offset = this . right ( ) - pos . x ;
12993
+ this . lockMouseFocus ( ) ;
12994
+ } ;
12995
+
12996
+ PaletteHandleMorph . prototype . mouseMove = function ( pos ) {
12997
+ var ide = this . target . parentThatIsA ( IDE_Morph ) ,
12998
+ cnf = ide . config ,
12999
+ border = cnf . border || 0 ,
13000
+ newPos = pos . x + this . offset ;
13001
+ ide . paletteWidth = Math . min (
13002
+ Math . max (
13003
+ 200 , newPos - ide . left ( ) - border * 2 ) ,
13004
+ cnf . noSprites ?
13005
+ ide . width ( ) - border * 2
13006
+ : ide . stageHandle . left ( ) -
13007
+ ide . spriteBar . tabBar . width ( )
13008
+ ) ;
13009
+ ide . setExtent ( ide . world ( ) . extent ( ) ) ;
13010
+ } ;
13011
+
13034
13012
PaletteHandleMorph . prototype . mouseDoubleClick = function ( ) {
13035
13013
this . target . parentThatIsA ( IDE_Morph ) . setPaletteWidth ( 200 ) ;
13036
13014
} ;
0 commit comments