Skip to content

Commit

Permalink
toolbar: add nice zoom images; add break after top-level tools
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmandel committed Feb 24, 2020
1 parent 2fa3914 commit 034133f
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 27 deletions.
1 change: 1 addition & 0 deletions images/voyager/zoom_1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/voyager/zoom_in.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/voyager/zoom_out.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/voyager/zoom_tofit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 19 additions & 9 deletions js9-allinone.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js9.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ JS9.globalOpts = {
userMenus: false, // add user menus?
userMenuDivider: "   ", // divide before user menu
imagesFileSubmenu: 5, // how many images trigger a submenu?
toolBar: ["annulus", "box", "circle", "ellipse", "line", "polygon", "text", "linear", "log", "zoom+", "zoom-", "zoom1"],
toolBar: ["annulus", "box", "circle", "ellipse", "line", "polygon", "text", "zoom+", "zoom-", "zoom1", "zoomtofit"],
syncOps: ["colormap","contrastbias","flip","pan","regions","rot90","scale","wcs","zoom"], // which ops are sync'ed?
syncReciprocate: true, // default value for reciprocal sync'ing
syncWCS: true, // default value for using WCS to sync
Expand Down
2 changes: 1 addition & 1 deletion js9.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 18 additions & 8 deletions js9plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -12901,49 +12901,49 @@ JS9.Toolbar.tools = [
{
"name": "annulus",
"tip": "annulus region",
"image": "images/toolbar/voyager/annulus.svg",
"image": "images/voyager/regions_annulus.svg",
"cmd": "AddRegions",
"args": ["annulus"]
},
{
"name": "box",
"tip": "box region",
"image": "images/toolbar/voyager/box.svg",
"image": "images/voyager/regions_box.svg",
"cmd": "AddRegions",
"args": ["box"]
},
{
"name": "circle",
"tip": "circle region",
"image": "images/toolbar/voyager/circle.svg",
"image": "images/voyager/regions_circle.svg",
"cmd": "AddRegions",
"args": ["circle"]
},
{
"name": "ellipse",
"tip": "ellipse region",
"image": "images/toolbar/voyager/ellipse.svg",
"image": "images/voyager/regions_ellipse.svg",
"cmd": "AddRegions",
"args": ["ellipse"]
},
{
"name": "line",
"tip": "line region",
"image": "images/toolbar/voyager/line.svg",
"image": "images/voyager/regions_line.svg",
"cmd": "AddRegions",
"args": ["line"]
},
{
"name": "polygon",
"tip": "polygon region",
"image": "images/toolbar/voyager/polygon.svg",
"image": "images/voyager/regions_polygon.svg",
"cmd": "AddRegions",
"args": ["polygon"]
},
{
"name": "text",
"tip": "text region",
"image": "images/toolbar/voyager/txt.svg",
"image": "images/voyager/regions_text.svg",
"cmd": "AddRegions",
"args": ["text"]
},
Expand All @@ -12970,22 +12970,32 @@ JS9.Toolbar.tools = [
},
{
"name": "zoom+",
"image": "images/voyager/zoom_in.svg",
"tip": "zoom in",
"cmd": "SetZoom",
"args": ["x2"]
},
{
"name": "zoom-",
"image": "images/voyager/zoom_out.svg",
"tip": "zoom out",
"cmd": "SetZoom",
"args": ["/2"]
},
{
"name": "zoom1",
"tip": "zoom 1",
"image": "images/voyager/zoom_1.svg",
"cmd": "SetZoom",
"args": [1]
},
{
"name": "zoomtofit",
"tip": "zoom to fit",
"image": "images/voyager/zoom_tofit.svg",
"cmd": "SetZoom",
"args": ["toFit"]
},
{
"name": "open",
"tip": "open local file dialog box",
Expand Down Expand Up @@ -13175,7 +13185,7 @@ JS9.Toolbar.init = function(width, height){
}
}
// add a break between important tools and the rest
// JS9.Toolbar.addTool.call(this, "$break");
JS9.Toolbar.addTool.call(this, "$break");
// add tools not in the globalOpts to the bottom of the list
for(i=0; i<JS9.Toolbar.tools.length; i++){
tool = JS9.Toolbar.tools[i];
Expand Down
26 changes: 18 additions & 8 deletions plugins/core/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,49 +75,49 @@ JS9.Toolbar.tools = [
{
"name": "annulus",
"tip": "annulus region",
"image": "images/toolbar/voyager/annulus.svg",
"image": "images/voyager/regions_annulus.svg",
"cmd": "AddRegions",
"args": ["annulus"]
},
{
"name": "box",
"tip": "box region",
"image": "images/toolbar/voyager/box.svg",
"image": "images/voyager/regions_box.svg",
"cmd": "AddRegions",
"args": ["box"]
},
{
"name": "circle",
"tip": "circle region",
"image": "images/toolbar/voyager/circle.svg",
"image": "images/voyager/regions_circle.svg",
"cmd": "AddRegions",
"args": ["circle"]
},
{
"name": "ellipse",
"tip": "ellipse region",
"image": "images/toolbar/voyager/ellipse.svg",
"image": "images/voyager/regions_ellipse.svg",
"cmd": "AddRegions",
"args": ["ellipse"]
},
{
"name": "line",
"tip": "line region",
"image": "images/toolbar/voyager/line.svg",
"image": "images/voyager/regions_line.svg",
"cmd": "AddRegions",
"args": ["line"]
},
{
"name": "polygon",
"tip": "polygon region",
"image": "images/toolbar/voyager/polygon.svg",
"image": "images/voyager/regions_polygon.svg",
"cmd": "AddRegions",
"args": ["polygon"]
},
{
"name": "text",
"tip": "text region",
"image": "images/toolbar/voyager/txt.svg",
"image": "images/voyager/regions_text.svg",
"cmd": "AddRegions",
"args": ["text"]
},
Expand All @@ -144,22 +144,32 @@ JS9.Toolbar.tools = [
},
{
"name": "zoom+",
"image": "images/voyager/zoom_in.svg",
"tip": "zoom in",
"cmd": "SetZoom",
"args": ["x2"]
},
{
"name": "zoom-",
"image": "images/voyager/zoom_out.svg",
"tip": "zoom out",
"cmd": "SetZoom",
"args": ["/2"]
},
{
"name": "zoom1",
"tip": "zoom 1",
"image": "images/voyager/zoom_1.svg",
"cmd": "SetZoom",
"args": [1]
},
{
"name": "zoomtofit",
"tip": "zoom to fit",
"image": "images/voyager/zoom_tofit.svg",
"cmd": "SetZoom",
"args": ["toFit"]
},
{
"name": "open",
"tip": "open local file dialog box",
Expand Down Expand Up @@ -349,7 +359,7 @@ JS9.Toolbar.init = function(width, height){
}
}
// add a break between important tools and the rest
// JS9.Toolbar.addTool.call(this, "$break");
JS9.Toolbar.addTool.call(this, "$break");
// add tools not in the globalOpts to the bottom of the list
for(i=0; i<JS9.Toolbar.tools.length; i++){
tool = JS9.Toolbar.tools[i];
Expand Down

0 comments on commit 034133f

Please sign in to comment.