-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* implement ability to clone viewers - NOTE: known bug with layer options reverting when adding to any new viewer (was not introduced here, but this definitely exposes it more readily)
- Loading branch information
Showing
6 changed files
with
77 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,26 @@ | ||
import os | ||
|
||
from glue.config import viewer_tool | ||
from glue.viewers.common.tool import Tool | ||
|
||
from jdaviz.core.tools import SidebarShortcutPlotOptions, SidebarShortcutExportPlot | ||
|
||
ICON_DIR = os.path.normpath(os.path.join(os.path.dirname(__file__), 'data', 'icons')) | ||
|
||
# point to the lcviz-version of plot options instead of jdaviz's | ||
SidebarShortcutPlotOptions.plugin_name = 'lcviz-plot-options' | ||
SidebarShortcutExportPlot.plugin_name = 'lcviz-export-plot' | ||
|
||
|
||
__all__ = ['ViewerClone'] | ||
|
||
|
||
@viewer_tool | ||
class ViewerClone(Tool): | ||
icon = os.path.join(ICON_DIR, 'viewer_clone') | ||
tool_id = 'lcviz:viewer_clone' | ||
action_text = 'Clone viewer' | ||
tool_tip = 'Clone this viewer' | ||
|
||
def activate(self): | ||
self.viewer.clone_viewer() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters