Skip to content

Commit 4194492

Browse files
committed
rename field to emphasise it stores a reference
1 parent b949275 commit 4194492

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/PDL/Graphics/TriD/ScrollButtonScaler.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
package PDL::Graphics::TriD::ScrollButtonScaler;
77
use base qw/PDL::Graphics::TriD::ButtonControl/;
8-
use fields qw/Dist Zoom/;
8+
use fields qw/DistRef Zoom/;
99

1010
sub new {
1111
my($type,$win,$dist,$zoom) = @_;
1212
my $this = $type->SUPER::new($win);
13-
$this->{Dist} = $dist;
13+
$this->{DistRef} = $dist;
1414
$this->{Zoom} = $zoom; # multiplier for zooming
1515
# >1 zooms out, <1 zooms in
1616
return $this;
@@ -19,7 +19,7 @@ sub new {
1919
sub ButtonRelease{
2020
my ($this,$x,$y) = @_;
2121
print "ButtonRelease @_\n" if $PDL::Graphics::TriD::verbose;
22-
${$this->{Dist}} *= $this->{Zoom};
22+
${$this->{DistRef}} *= $this->{Zoom};
2323
1;
2424
}
2525

lib/PDL/Graphics/TriD/SimpleScaler.pm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ package PDL::Graphics::TriD::SimpleScaler;
77
use strict;
88
use warnings;
99
use base qw/PDL::Graphics::TriD::ButtonControl/;
10-
use fields qw/Dist/;
10+
use fields qw/DistRef/;
1111

1212
$PDL::Graphics::TriD::verbose //= 0;
1313

1414
sub new {
1515
my($type,$win,$dist) = @_;
16-
16+
1717
my $this = $type->SUPER::new( $win);
1818

19-
$this->{Dist} = $dist;
19+
$this->{DistRef} = $dist;
2020
$win->add_resizecommand(sub {print "Resized window: ",join(",",@_),"\n" if $PDL::Graphics::TriD::verbose; $this->set_wh(@_); });
2121
return $this;
2222
}
@@ -32,7 +32,7 @@ sub xy2norm {
3232

3333
sub mouse_moved {
3434
my($this,$x0,$y0,$x1,$y1) = @_;
35-
${$this->{Dist}} *=
35+
${$this->{DistRef}} *=
3636
$this->xy2fac($this->xy2norm($x0,$y0),$this->xy2norm($x1,$y1));
3737
}
3838

0 commit comments

Comments
 (0)