Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Testing a split screen feature.

  • Loading branch information...
commit 9d002aee11524add604383e2cc8ba69fd94b05a9 1 parent 6f0b28d
@haehn haehn authored
Showing with 30 additions and 8 deletions.
  1. +7 −0 css/viewer.css
  2. +2 −0  index.html
  3. +21 −8 js/jquery.viewer.js
View
7 css/viewer.css
@@ -45,6 +45,13 @@
left: 50%;
}
+.toolbar_icon {
+ cursor: pointer;
+ position: absolute;
+ opacity: 0.7;
+ left:10px;
+}
+
.ren2d_icon {
cursor: pointer;
position: absolute;
View
2  index.html
@@ -423,6 +423,8 @@
<!-- Slice:Drop logo -->
<div id='blacklogo'>
<a href=''><img src='gfx/slicedrop_transparent.png' /></a>
+ <span class='ui-icon ui-icon-image toolbar_icon' title='Split Screen' onclick='javascript:split_screen()'></span><span class='ui-icon ui-icon-image toolbar_icon' style='left:20px' title='Split Screen' onclick='javascript:split_screen()'></span>
+
</div>
</div>
View
29 js/jquery.viewer.js
@@ -1,22 +1,35 @@
// the viewers
jQuery(function() {
-
-
// create the 2d sliders
jQuery("#yellow_slider").slider({
- slide: volumeslicingX
+ slide : volumeslicingX
});
jQuery("#yellow_slider .ui-slider-handle").unbind('keydown');
-
+
jQuery("#red_slider").slider({
- slide: volumeslicingY
+ slide : volumeslicingY
});
jQuery("#red_slider .ui-slider-handle").unbind('keydown');
-
+
jQuery("#green_slider").slider({
- slide: volumeslicingZ
+ slide : volumeslicingZ
});
jQuery("#green_slider .ui-slider-handle").unbind('keydown');
-
+
});
+
+// splits the document into two frames
+function split_screen() {
+
+ if ( parent.viewer_left !== undefined ) {
+ // exit if we are already in split screen mode
+ return;
+ }
+
+ frameset = '<FRAMESET cols="50%,50%" BORDER=3>' + '<FRAME src="'
+ + document.location.href + '"' + ' NAME="viewer_left">' + '<FRAME src="'
+ + document.location.href + '"' + ' NAME="viewer_right">' + '</FRAMESET>';
+ location = 'javascript:frameset';
+
+};
Please sign in to comment.
Something went wrong with that request. Please try again.