summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/jsfile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/jsfile.cc')
-rw-r--r--Build/source/utils/asymptote/jsfile.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/Build/source/utils/asymptote/jsfile.cc b/Build/source/utils/asymptote/jsfile.cc
index 02a1f7f9c32..784245a53a9 100644
--- a/Build/source/utils/asymptote/jsfile.cc
+++ b/Build/source/utils/asymptote/jsfile.cc
@@ -56,7 +56,10 @@ void jsfile::open(string name) {
<< "angle=" << gl::Angle << ";"
<< newl
<< "Zoom0=" << gl::Zoom0 << ";" << newl
- << "zoomFactor=" << getSetting<double>("zoomfactor") << ";" << newl
+ << "viewportmargin=" << gl::Margin << ";" << newl;
+ if(gl::Shift != pair(0.0,0.0))
+ out << "viewportshift=" << gl::Shift*gl::Zoom0 << ";" << newl;
+ out << "zoomFactor=" << getSetting<double>("zoomfactor") << ";" << newl
<< "zoomPinchFactor=" << getSetting<double>("zoomPinchFactor") << ";"
<< newl
<< "zoomPinchCap=" << getSetting<double>("zoomPinchCap") << ";" << newl
@@ -66,8 +69,7 @@ void jsfile::open(string name) {
<< "shiftWaitTime=" << getSetting<double>("shiftWaitTime") << ";"
<< newl
<< "vibrateTime=" << getSetting<double>("vibrateTime") << ";"
- << newl
- << "viewportmargin=" << gl::Margin << ";" << newl << newl
+ << newl << newl
<< "Lights=[";
for(size_t i=0; i < gl::nlights; ++i) {
size_t i4=4*i;