Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fslpy
Commits
5a0d54d0
Commit
5a0d54d0
authored
10 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Fixed zooming (only on x axis right now)
parent
aa28b357
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/fslview/orthopanel.py
+20
-16
20 additions, 16 deletions
fsl/fslview/orthopanel.py
with
20 additions
and
16 deletions
fsl/fslview/orthopanel.py
+
20
−
16
View file @
5a0d54d0
...
@@ -189,23 +189,27 @@ class OrthoPanel(wx.Panel, props.HasProperties):
...
@@ -189,23 +189,27 @@ class OrthoPanel(wx.Panel, props.HasProperties):
newxmin
=
canvas
.
xmin
+
xshift
newxmin
=
canvas
.
xmin
+
xshift
newxmax
=
canvas
.
xmax
+
xshift
newxmax
=
canvas
.
xmax
+
xshift
newymin
=
canvas
.
ymin
+
xshift
newymin
=
canvas
.
ymin
+
yshift
newymax
=
canvas
.
ymax
+
xshift
newymax
=
canvas
.
ymax
+
yshift
if
newxmin
<
imgxmin
:
xshift
=
newxmin
-
imgxmin
if
newxmin
<
imgxmin
:
elif
newxmax
>
imgxmax
:
xshift
=
newxmax
-
imgxmax
newxmin
=
imgxmin
newxmax
=
imgxmin
+
abs
(
canvas
.
xmax
-
canvas
.
xmin
)
elif
newxmax
>
imgxmax
:
newxmax
=
imgxmax
newxmin
=
imgxmax
-
abs
(
canvas
.
xmax
-
canvas
.
xmin
)
if
newymin
<
imgymin
:
yshift
=
newymin
-
imgymin
if
newymin
<
imgymin
:
elif
newymax
>
imgymax
:
yshift
=
newym
ax
-
imgym
ax
newym
in
=
imgym
in
newymax
=
imgymin
+
abs
(
canvas
.
ymax
-
canvas
.
ymin
)
if
xshift
!=
0
:
el
if
newymax
>
imgymax
:
print
'
xshift {}
'
.
format
(
xshift
)
newymax
=
imgymax
canvas
.
xmin
=
canvas
.
x
min
+
xshift
newymin
=
imgymax
-
abs
(
canvas
.
ymax
-
canvas
.
y
min
)
canvas
.
xmax
=
canvas
.
xmax
+
xshift
if
yshift
!=
0
:
canvas
.
xmin
=
newxmin
print
'
yshift {}
'
.
format
(
yshift
)
canvas
.
xmax
=
newxmax
canvas
.
ymin
=
canvas
.
ymin
+
yshift
canvas
.
ymin
=
newymin
canvas
.
ymax
=
canvas
.
ymax
+
yshift
canvas
.
ymax
=
newymax
def
_setCanvasPosition
(
self
,
ev
):
def
_setCanvasPosition
(
self
,
ev
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment