Ignore:
Timestamp:
Oct 9, 2005 9:41:29 PM (17 years ago)
Author:
mmc
Message:
  • Fixed an annoying bug in the scroller that would cause the device to jitter up and down in some cases. (1-barrier case of app-rtd)
  • Fixed cloud/mesh objects to allow different units for each of the various axes.
  • Fixed the install.tcl script to avoid popping up the notice about Rappture being installed when tclsh is running the script.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/scroller.tcl

    r44 r95  
    3535    protected method _fixframe {which}
    3636    protected method _fixsize {}
    37     protected method _lock {option}
     37    protected method _lock {option which}
    3838
    3939    private variable _dispatcher "" ;# dispatcher for !events
    4040    private variable _contents ""   ;# widget being controlled
    4141    private variable _frame ""      ;# for "contents frame" calls
    42     private variable _lock 0        ;# for _lock on x-scrollbar
     42    private variable _lock          ;# for _lock on x/y scrollbar
    4343}
    4444                                                                               
     
    5454# ----------------------------------------------------------------------
    5555itcl::body Rappture::Scroller::constructor {args} {
     56    array set _lock { x 0 y 0 }
     57
    5658    Rappture::dispatcher _dispatcher
    5759
     
    196198        x {
    197199            if {$state} {
    198                 grid $itk_component(xsbar) -row 1 -column 0 -sticky ew
    199                 _lock set
     200                if {![_lock active x]} {
     201                    grid $itk_component(xsbar) -row 1 -column 0 -sticky ew
     202                }
    200203            } else {
    201                 if {![_lock active]} {
    202                     grid forget $itk_component(xsbar)
    203                 }
     204                grid forget $itk_component(xsbar)
     205                _lock set x
    204206            }
    205207        }
    206208        y {
    207209            if {$state} {
    208                 grid $itk_component(ysbar) -row 0 -column 1 -sticky ns
     210                if {![_lock active y]} {
     211                    grid $itk_component(ysbar) -row 0 -column 1 -sticky ns
     212                }
    209213            } else {
    210214                grid forget $itk_component(ysbar)
     215                _lock set y
    211216            }
    212217        }
     
    263268
    264269# ----------------------------------------------------------------------
    265 # USAGE: _lock set
    266 # USAGE: _lock reset
    267 # USAGE: _lock active
     270# USAGE: _lock set <which>
     271# USAGE: _lock reset <which>
     272# USAGE: _lock active <which>
    268273#
    269274# Used internally to lock out vibrations when the x-scrollbar pops
     
    275280# up.
    276281# ----------------------------------------------------------------------
    277 itcl::body Rappture::Scroller::_lock {option} {
     282itcl::body Rappture::Scroller::_lock {option which} {
    278283    switch -- $option {
    279284        set {
    280             set _lock 1
    281             after cancel [itcl::code $this _lock reset]
    282             after 50 [itcl::code $this _lock reset]
     285            set _lock($which) 1
     286            after cancel [itcl::code $this _lock reset $which]
     287            after 50 [itcl::code $this _lock reset $which]
    283288        }
    284289        reset {
    285             set _lock 0
     290            set _lock($which) 0
    286291        }
    287292        active {
    288             return $_lock
     293            return $_lock($which)
    289294        }
    290295        default {
Note: See TracChangeset for help on using the changeset viewer.