Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
fix omitted javascript snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
guenterrote committed Jan 24, 2021
1 parent c29270a commit eca2294
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
7 changes: 7 additions & 0 deletions src/sage/ext_data/threejs/threejs_template.html
Expand Up @@ -535,6 +535,13 @@
textArea.select();
document.execCommand( 'copy' );

var m = document.getElementById( 'menu-message' );
m.innerHTML = 'Camera position '+ cam_position+' copied to clipboard';
m.style.display = 'block';
setTimeout( function() { m.style.display = 'none'; }, 2000 );

}

</script>

<div id="menu-container" onclick="toggleMenu()">&#x24d8;
Expand Down
18 changes: 9 additions & 9 deletions src/sage/plot/plot3d/base.pyx
Expand Up @@ -1040,10 +1040,10 @@ cdef class Graphics3d(SageObject):
viewdir = (1,0,0)

# switch from LH to RH coords to be consistent with java rendition
viewdir = flip_orientation(viewdir)
updir = flip_orientation(updir)
camera_center = flip_orientation(camera_center)
light_position = flip_orientation(light_position)
viewdir = _flip_orientation(viewdir)
updir = _flip_orientation(updir)
camera_center = _flip_orientation(camera_center)
light_position = _flip_orientation(light_position)

return """
begin_scene
Expand Down Expand Up @@ -1601,9 +1601,9 @@ end_scene""".format(
the figure
- ``figsize`` -- (default: 5); x or pair [x,y] for
numbers, e.g., [5,5]; controls the size of the output figure. E.g.,
with Tachyon the number of pixels in each direction is 100 times
figsize[0]. This is ignored for the jmol embedded renderer.
numbers, e.g., [5,5]; controls the size of the output figure.
With 'tachyon', the resolution (in number of pixels) is 100 times
figsize. This is ignored for the jmol embedded renderer.
- ``aspect_ratio`` -- (default: ``'automatic'``) -- aspect
ratio of the coordinate system itself. Give [1,1,1] to make spheres
Expand Down Expand Up @@ -3245,6 +3245,6 @@ def _tostring(s):
# return s
return ' '.join(map(str,s))

def flip_orientation(v):
"switch from LH to RH coords to be consistent with java rendition"
def _flip_orientation(v):
"switch from LH to RH coords to be consistent with Java rendition"
return (v[0],-v[1],v[2])

0 comments on commit eca2294

Please sign in to comment.