histomicsui 1.8.1.dev225__tar.gz → 1.8.1.dev253__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {histomicsui-1.8.1.dev225/histomicsui.egg-info → histomicsui-1.8.1.dev253}/PKG-INFO +1 -1
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/docs/config_options.rst +26 -2
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/docs/controls.rst +2 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253/histomicsui.egg-info}/PKG-INFO +1 -1
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui.egg-info/SOURCES.txt +1 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui.egg-info/scm_file_list.json +5 -0
- histomicsui-1.8.1.dev253/histomicsui.egg-info/scm_version.json +8 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/test_files/.histomicsui_config.yaml +1 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/allowedGroupsSpec.js +14 -14
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/analysisSpec.js +53 -8
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/annotationSpec.js +141 -0
- histomicsui-1.8.1.dev253/tests/web_client_specs/hotkeysSpec.js +155 -0
- histomicsui-1.8.1.dev225/histomicsui.egg-info/scm_version.json +0 -8
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/.circleci/config.yml +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/.circleci/get_version.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/.circleci/publish_pypi.sh +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/.editorconfig +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/.git-blame-ignore-revs +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/.gitignore +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/.pre-commit-config.yaml +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/LICENSE +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/MANIFEST.in +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/NOTICE +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/README.rst +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/codecov.yml +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/docs/annotation_group_restrictions.rst +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/docs/images/cut.gif +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/docs/images/difference.gif +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/docs/images/intersect.gif +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/docs/images/union.gif +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/docs/images/xor.gif +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/docs/slicer_cli_plugins.rst +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/__init__.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/constants.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/girder_worker_plugin.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/handlers.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/models/__init__.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/models/aperio.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/models/case.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/models/cohort.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/models/image.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/models/meta.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/models/pathology.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/models/slide.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/rest/__init__.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/rest/aperio.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/rest/hui_resource.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/rest/image_browse_resource.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/rest/system.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/rest/tcga.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui.egg-info/dependency_links.txt +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui.egg-info/entry_points.txt +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui.egg-info/not-zip-safe +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui.egg-info/requires.txt +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui.egg-info/top_level.txt +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/pyproject.toml +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/requirements-dev.txt +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/ruff.toml +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/sample_data/Easy1.png +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/sample_data/sample_svs_image.TCGA-DU-6399-01A-01-TS1.e8eb65de-d63e-42db-af6f-14fefbbdf7bd.svs +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/setup.cfg +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/setup.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/__init__.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/conftest.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/datastore.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/girder_utilities.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/test_files/sample.anot +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/test_files/sample.meta +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/test_files/sample_girder_id.anot +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/test_files/test_analysis_detection.xml +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/test_files/test_analysis_features.xml +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/test_handlers.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/test_hui_rest.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/test_image_browse_endpoints.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/test_load.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/test_tcga.py +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/.eslintrc +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/girderUISpec.js +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/huiSpec.js +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/huiTest.js +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/itemSpec.js +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/metadataPanelSpec.js +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/metadataPlotSpec.js +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/overviewPanelSpec.js +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/panelLayoutSpec.js +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/pixelmapCategorySpec.js +0 -0
- {histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tox.ini +0 -0
|
@@ -66,7 +66,14 @@ _________________
|
|
|
66
66
|
lineColor: rgb(0, 0, 255)
|
|
67
67
|
lineWidth: 2
|
|
68
68
|
|
|
69
|
-
If a hotkey is specified for a group, it will only be active if the group was loaded from the config file. That is, moving to another folder where the config file does not apply will disable the hotkey.
|
|
69
|
+
If a hotkey is specified for a group, it will only be active if the group was loaded from the config file. That is, moving to another folder where the config file does not apply will disable the hotkey.
|
|
70
|
+
|
|
71
|
+
Hotkeys
|
|
72
|
+
_______
|
|
73
|
+
|
|
74
|
+
Most keyboard shortcuts can be changed with a ``hotkeys`` section. Each entry names an ``action`` and a ``key``. A key is a single key name, optionally preceded by modifiers joined with ``+`` or ``-``, such as ``r``, ``shift+s``, ``ctrl+alt+x``, ``left``, ``space``, ``esc``, or ``plus``. Modifiers can also be given as ``ctrl``, ``alt``, ``meta``, or ``shift`` values of ``true``. Modifiers that are not listed must not be pressed, except that ``shift`` is ignored for punctuation that needs it to be typed.
|
|
75
|
+
|
|
76
|
+
If any entry mentions an action, the listed keys replace that action's default keys, and any other action that had one of those keys by default loses it. An action can have more than one key by listing it more than once, and ``key: null`` removes all of its keys.
|
|
70
77
|
|
|
71
78
|
::
|
|
72
79
|
|
|
@@ -75,9 +82,26 @@ If a hotkey is specified for a group, it will only be active if the group was lo
|
|
|
75
82
|
-
|
|
76
83
|
key: r
|
|
77
84
|
ctrl: true
|
|
78
|
-
alt: false
|
|
79
85
|
action: group
|
|
80
86
|
param: Red
|
|
87
|
+
-
|
|
88
|
+
key: h
|
|
89
|
+
action: pan.left
|
|
90
|
+
-
|
|
91
|
+
key: x
|
|
92
|
+
action: draw.rectangle
|
|
93
|
+
|
|
94
|
+
The ``group`` action selects the style group named by ``param``. The other actions are:
|
|
95
|
+
|
|
96
|
+
- Navigation: ``pan.left ``, ``pan.right ``, ``pan.up ``, ``pan.down ``, ``zoom.in ``, ``zoom.out ``, ``rotate.ccw ``, ``rotate.cw ``, ``rotate.0 `` (reset rotation), and ``zoom.0 ``, ``zoom.3 ``, ... ``zoom.18 `` (jump to a zoom level). For the panning, zooming, and rotating actions, only the base key is set; holding shift or ctrl+shift with it still makes a larger step.
|
|
97
|
+
- Annotations: ``annotations.toggle ``, ``annotation.create ``, ``element.edit ``, ``element.menu ``, ``select.rectangle ``, ``select.polygon ``, ``select.clear ``.
|
|
98
|
+
- Drawing: ``draw.point ``, ``draw.rectangle ``, ``draw.ellipse ``, ``draw.circle ``, ``draw.polygon ``, ``draw.line ``, ``draw.brush ``, ``draw.finish ``, ``draw.cancel ``, ``brush.shape ``, ``brush.smaller ``, ``brush.larger ``, ``group.previous ``, ``group.next ``.
|
|
99
|
+
- Channels and bands: ``layer.1 `` through ``layer.20 `` toggle the visibility of that channel or band when compositing in the frame selector. By default these are ctrl+1 through ctrl+0 and ctrl+alt+1 through ctrl+alt+0.
|
|
100
|
+
|
|
101
|
+
User Hotkeys
|
|
102
|
+
~~~~~~~~~~~~
|
|
103
|
+
|
|
104
|
+
Logged-in users can choose their own keys from **Keyboard shortcuts** in the user menu. These are saved as a ``hotkeys `` section, in the same format as above, in a ``.histomicsui_user_config.yaml `` file in the user's private folder (normally ``Private ``; see large_image's per-user configuration files), which can also be edited directly. If the user makes that folder public, their hotkeys no longer apply. User hotkeys apply in every folder and take precedence over the folder's config file. **Reset all** in the dialog removes them.
|
|
81
105
|
|
|
82
106
|
Unselected Annotation Capacity
|
|
83
107
|
______________________________
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
Mouse and Keyboard Controls
|
|
2
2
|
===========================
|
|
3
3
|
|
|
4
|
+
The keys listed here are the defaults. Most of them can be changed by an administrator in a folder's config file (see :doc:`config_options`) or by each user from **Keyboard shortcuts** in the user menu.
|
|
5
|
+
|
|
4
6
|
Basic Image Controls
|
|
5
7
|
--------------------
|
|
6
8
|
|
|
@@ -74,6 +74,7 @@ tests/web_client_specs/allowedGroupsSpec.js
|
|
|
74
74
|
tests/web_client_specs/analysisSpec.js
|
|
75
75
|
tests/web_client_specs/annotationSpec.js
|
|
76
76
|
tests/web_client_specs/girderUISpec.js
|
|
77
|
+
tests/web_client_specs/hotkeysSpec.js
|
|
77
78
|
tests/web_client_specs/huiSpec.js
|
|
78
79
|
tests/web_client_specs/huiTest.js
|
|
79
80
|
tests/web_client_specs/itemSpec.js
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui.egg-info/scm_file_list.json
RENAMED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"histomicsui/web_client/collections/index.js",
|
|
47
47
|
"histomicsui/web_client/dialogs/confirmDialog.js",
|
|
48
48
|
"histomicsui/web_client/dialogs/editElement.js",
|
|
49
|
+
"histomicsui/web_client/dialogs/editHotkeys.js",
|
|
49
50
|
"histomicsui/web_client/dialogs/editRegionOfInterest.js",
|
|
50
51
|
"histomicsui/web_client/dialogs/editStyleGroups.js",
|
|
51
52
|
"histomicsui/web_client/dialogs/index.js",
|
|
@@ -55,6 +56,7 @@
|
|
|
55
56
|
"histomicsui/web_client/dialogs/saveAnnotation.js",
|
|
56
57
|
"histomicsui/web_client/events.js",
|
|
57
58
|
"histomicsui/web_client/histomicsui.ts",
|
|
59
|
+
"histomicsui/web_client/hotkeys.js",
|
|
58
60
|
"histomicsui/web_client/index.html",
|
|
59
61
|
"histomicsui/web_client/index.js",
|
|
60
62
|
"histomicsui/web_client/main.js",
|
|
@@ -77,6 +79,7 @@
|
|
|
77
79
|
"histomicsui/web_client/static/favicon.png",
|
|
78
80
|
"histomicsui/web_client/stylesheets/body/configView.styl",
|
|
79
81
|
"histomicsui/web_client/stylesheets/body/image.styl",
|
|
82
|
+
"histomicsui/web_client/stylesheets/dialogs/editHotkeys.styl",
|
|
80
83
|
"histomicsui/web_client/stylesheets/dialogs/editStyleGroups.styl",
|
|
81
84
|
"histomicsui/web_client/stylesheets/dialogs/metadataPlot.styl",
|
|
82
85
|
"histomicsui/web_client/stylesheets/dialogs/openAnnotatedImage.styl",
|
|
@@ -103,6 +106,7 @@
|
|
|
103
106
|
"histomicsui/web_client/templates/dialogs/annotatedImageList.pug",
|
|
104
107
|
"histomicsui/web_client/templates/dialogs/confirmDialog.pug",
|
|
105
108
|
"histomicsui/web_client/templates/dialogs/editElement.pug",
|
|
109
|
+
"histomicsui/web_client/templates/dialogs/editHotkeys.pug",
|
|
106
110
|
"histomicsui/web_client/templates/dialogs/editRegionOfInterest.pug",
|
|
107
111
|
"histomicsui/web_client/templates/dialogs/editStyleGroups.pug",
|
|
108
112
|
"histomicsui/web_client/templates/dialogs/metadataPlot.pug",
|
|
@@ -201,6 +205,7 @@
|
|
|
201
205
|
"tests/web_client_specs/analysisSpec.js",
|
|
202
206
|
"tests/web_client_specs/annotationSpec.js",
|
|
203
207
|
"tests/web_client_specs/girderUISpec.js",
|
|
208
|
+
"tests/web_client_specs/hotkeysSpec.js",
|
|
204
209
|
"tests/web_client_specs/huiSpec.js",
|
|
205
210
|
"tests/web_client_specs/huiTest.js",
|
|
206
211
|
"tests/web_client_specs/itemSpec.js",
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/allowedGroupsSpec.js
RENAMED
|
@@ -206,7 +206,7 @@ girderTest.promise.done(function () {
|
|
|
206
206
|
|
|
207
207
|
it('creates a restricted and an unrestricted annotation', function () {
|
|
208
208
|
createAnnotation('restricted annotation for #5', {
|
|
209
|
-
allowed_groups: ['
|
|
209
|
+
allowed_groups: ['groupF', 'groupG']
|
|
210
210
|
}, [rectangleElement(30, 30)], restricted);
|
|
211
211
|
});
|
|
212
212
|
|
|
@@ -214,16 +214,16 @@ girderTest.promise.done(function () {
|
|
|
214
214
|
createAnnotation('unrestricted annotation for #5', {}, [rectangleElement(40, 40)], unrestricted);
|
|
215
215
|
});
|
|
216
216
|
|
|
217
|
-
it('auto-creates the restricted annotation\'s allowed groups (
|
|
218
|
-
// briefly edit the restricted annotation in the Draw panel to create
|
|
219
|
-
//
|
|
217
|
+
it('auto-creates the restricted annotation\'s allowed groups (groupF/groupG) as styles', function () {
|
|
218
|
+
// briefly edit the restricted annotation in the Draw panel to create groupF and
|
|
219
|
+
// groupG before switching the active annotation below.
|
|
220
220
|
var bodyView = huiTest.app.bodyView;
|
|
221
221
|
bodyView.annotations.add(restricted.annotation);
|
|
222
222
|
bodyView._editAnnotation(restricted.annotation);
|
|
223
223
|
waitsFor(function () {
|
|
224
224
|
return !!bodyView.drawWidget &&
|
|
225
|
-
bodyView.drawWidget._groups.has('
|
|
226
|
-
bodyView.drawWidget._groups.has('
|
|
225
|
+
bodyView.drawWidget._groups.has('groupF') &&
|
|
226
|
+
bodyView.drawWidget._groups.has('groupG');
|
|
227
227
|
});
|
|
228
228
|
});
|
|
229
229
|
|
|
@@ -247,7 +247,7 @@ girderTest.promise.done(function () {
|
|
|
247
247
|
bodyView._selectElement(element);
|
|
248
248
|
|
|
249
249
|
var groups = bodyView.contextMenu._getAnnotationGroups();
|
|
250
|
-
expect(groups.sort()).toEqual(['
|
|
250
|
+
expect(groups.sort()).toEqual(['groupF', 'groupG']);
|
|
251
251
|
});
|
|
252
252
|
});
|
|
253
253
|
|
|
@@ -274,7 +274,7 @@ girderTest.promise.done(function () {
|
|
|
274
274
|
var renderedGroups = bodyView.contextMenu.$('.h-set-group').map(function () {
|
|
275
275
|
return window.$(this).data('group');
|
|
276
276
|
}).get();
|
|
277
|
-
expect(renderedGroups.sort()).toEqual(['
|
|
277
|
+
expect(renderedGroups.sort()).toEqual(['groupF', 'groupG']);
|
|
278
278
|
});
|
|
279
279
|
});
|
|
280
280
|
});
|
|
@@ -352,32 +352,32 @@ girderTest.promise.done(function () {
|
|
|
352
352
|
// simulate editing the annotation's metadata via the "Edit annotation" dialog,
|
|
353
353
|
// which mutates attributes directly and triggers 'change:annotation' rather than
|
|
354
354
|
// calling .set()
|
|
355
|
-
result.annotation.get('annotation').attributes = {allowed_groups: ['
|
|
355
|
+
result.annotation.get('annotation').attributes = {allowed_groups: ['groupF', 'groupG']};
|
|
356
356
|
result.annotation.trigger('change:annotation', result.annotation, {});
|
|
357
357
|
|
|
358
358
|
waitsFor(function () {
|
|
359
359
|
// the Draw panel's `_groups` collection updates synchronously, but its dropdown
|
|
360
360
|
// DOM is refreshed via a debounced render, so also wait for the DOM to catch up
|
|
361
361
|
// before asserting on it
|
|
362
|
-
return drawWidget._groups.has('
|
|
362
|
+
return drawWidget._groups.has('groupF') && drawWidget._groups.has('groupG') &&
|
|
363
363
|
drawWidget.$('.h-style-group option').length === 2;
|
|
364
364
|
});
|
|
365
365
|
runs(function () {
|
|
366
|
-
expect(drawWidget._style.id).toBe('
|
|
366
|
+
expect(drawWidget._style.id).toBe('groupF');
|
|
367
367
|
var drawValues = drawWidget.$('.h-style-group option').map(function () {
|
|
368
368
|
return this.value;
|
|
369
369
|
}).get();
|
|
370
|
-
expect(drawValues).toEqual(['
|
|
370
|
+
expect(drawValues).toEqual(['groupF', 'groupG']);
|
|
371
371
|
});
|
|
372
372
|
// the context menu keeps its own StyleCollection, refetched asynchronously via the
|
|
373
373
|
// 'h:styleGroupsEdited' event once the Draw panel auto-creates the newly allowed
|
|
374
374
|
// groups; wait for that refetch to complete before checking it
|
|
375
375
|
waitsFor(function () {
|
|
376
|
-
return bodyView.contextMenu.styles.get('
|
|
376
|
+
return bodyView.contextMenu.styles.get('groupF') && bodyView.contextMenu.styles.get('groupG');
|
|
377
377
|
});
|
|
378
378
|
runs(function () {
|
|
379
379
|
var contextGroups = bodyView.contextMenu._getAnnotationGroups();
|
|
380
|
-
expect(contextGroups.sort()).toEqual(['
|
|
380
|
+
expect(contextGroups.sort()).toEqual(['groupF', 'groupG']);
|
|
381
381
|
});
|
|
382
382
|
});
|
|
383
383
|
});
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/analysisSpec.js
RENAMED
|
@@ -39,12 +39,14 @@ girderTest.promise.done(function () {
|
|
|
39
39
|
|
|
40
40
|
it('get dropdown values', function () {
|
|
41
41
|
var $el = $('.h-analyses-dropdown');
|
|
42
|
-
|
|
42
|
+
var image = $el.find('.h-analyses-image a:contains("huirchive/histomicstk")');
|
|
43
|
+
expect(image.length).toBe(1);
|
|
44
|
+
expect($el.find('.h-analyses-recent').length).toBe(0);
|
|
45
|
+
image.click();
|
|
43
46
|
|
|
44
|
-
$el = $el.find('.
|
|
45
|
-
expect($el.find('
|
|
47
|
+
$el = $el.find('.h-analyses-task-group.h-active');
|
|
48
|
+
expect($el.find('.h-analyses-version-name:contains("latest")').length).toBe(1);
|
|
46
49
|
|
|
47
|
-
$el = $el.find('.dropdown-menu:first');
|
|
48
50
|
var link = $el.find('a:contains("NucleiDetection")');
|
|
49
51
|
expect(link.length).toBe(1);
|
|
50
52
|
|
|
@@ -124,10 +126,12 @@ girderTest.promise.done(function () {
|
|
|
124
126
|
});
|
|
125
127
|
it('open a new analysis', function () {
|
|
126
128
|
var $el = $('.h-analyses-dropdown');
|
|
127
|
-
|
|
129
|
+
var image = $el.find('.h-analyses-image a:contains("huirchive/histomicstk")');
|
|
130
|
+
expect(image.length).toBe(1);
|
|
131
|
+
image.click();
|
|
128
132
|
|
|
129
|
-
$el = $el.find('.
|
|
130
|
-
expect($el.find('
|
|
133
|
+
$el = $el.find('.h-analyses-task-group.h-active');
|
|
134
|
+
expect($el.find('.h-analyses-version-name:contains("latest")').length).toBe(1);
|
|
131
135
|
|
|
132
136
|
var link = $el.find('a:contains("ComputeNucleiFeatures")');
|
|
133
137
|
expect(link.length).toBe(1);
|
|
@@ -157,9 +161,50 @@ girderTest.promise.done(function () {
|
|
|
157
161
|
}, 'region annotation to be removed');
|
|
158
162
|
});
|
|
159
163
|
});
|
|
164
|
+
describe('analyses menu', function () {
|
|
165
|
+
it('recently used', function () {
|
|
166
|
+
var $el = $('.h-analyses-dropdown');
|
|
167
|
+
expect($el.find('.h-analyses-recent').length).toBe(1);
|
|
168
|
+
$el.find('.h-analyses-recent a').click();
|
|
169
|
+
var links = $el.find('.h-analyses-task-group.h-active .h-analysis-item');
|
|
170
|
+
expect(links.length).toBe(2);
|
|
171
|
+
expect(links.eq(0).attr('data-cli')).toBe('ComputeNucleiFeatures');
|
|
172
|
+
expect(links.eq(0).find('.h-analyses-item-source').text()).toBe('huirchive/histomicstk:latest');
|
|
173
|
+
expect(links.eq(1).attr('data-cli')).toBe('NucleiDetection');
|
|
174
|
+
});
|
|
175
|
+
it('filter', function () {
|
|
176
|
+
var $el = $('.h-analyses-dropdown');
|
|
177
|
+
$el.find('.h-analyses-filter').val('histomicstk detect').trigger('input');
|
|
178
|
+
var links = $el.find('li:not(.hidden) > .h-analysis-item');
|
|
179
|
+
// one in the recently used list and one in the image
|
|
180
|
+
expect(links.length).toBe(2);
|
|
181
|
+
expect(links.filter('[data-cli="NucleiDetection"]').length).toBe(2);
|
|
182
|
+
expect($el.find('.h-analyses-empty').hasClass('hidden')).toBe(true);
|
|
183
|
+
|
|
184
|
+
$el.find('.h-analyses-filter').val('nosuchanalysis').trigger('input');
|
|
185
|
+
expect($el.find('li:not(.hidden) > .h-analysis-item').length).toBe(0);
|
|
186
|
+
expect($el.find('.h-analyses-image:not(.hidden)').length).toBe(0);
|
|
187
|
+
expect($el.find('.h-analyses-empty').hasClass('hidden')).toBe(false);
|
|
188
|
+
|
|
189
|
+
$el.find('.h-analyses-filter').val('').trigger('input');
|
|
190
|
+
expect($el.find('li:not(.hidden) > .h-analysis-item').length).toBe(4);
|
|
191
|
+
expect($el.find('.h-analyses-image:not(.hidden)').length).toBe(2);
|
|
192
|
+
expect($el.find('.h-analyses-task-group.h-active').length).toBe(1);
|
|
193
|
+
});
|
|
194
|
+
it('keyboard', function () {
|
|
195
|
+
var $el = $('.h-analyses-dropdown');
|
|
196
|
+
$el.find('.h-analyses-recent a').click();
|
|
197
|
+
expect($el.find('.h-analyses-task-group.h-active').attr('data-key')).toBe(':recent');
|
|
198
|
+
// moving focus to an image shows its tasks
|
|
199
|
+
$el.find('.h-analyses-image a:contains("huirchive/histomicstk")').trigger('focusin');
|
|
200
|
+
var $group = $el.find('.h-analyses-task-group.h-active');
|
|
201
|
+
expect($group.attr('data-key')).toBe('huirchive/histomicstk');
|
|
202
|
+
expect($group.find('.h-analysis-item').length).toBe(2);
|
|
203
|
+
});
|
|
204
|
+
});
|
|
160
205
|
describe('close analysis', function () {
|
|
161
206
|
it('open analysis', function () {
|
|
162
|
-
var $el = $('.h-analyses-dropdown');
|
|
207
|
+
var $el = $('.h-analyses-dropdown .h-analyses-task-group[data-key="huirchive/histomicstk"]');
|
|
163
208
|
var link = $el.find('a:contains("NucleiDetection")');
|
|
164
209
|
link.click();
|
|
165
210
|
girderTest.waitForLoad();
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/annotationSpec.js
RENAMED
|
@@ -643,6 +643,94 @@ girderTest.promise.done(function () {
|
|
|
643
643
|
expect($('.h-draw.active').length).toBe(0);
|
|
644
644
|
});
|
|
645
645
|
});
|
|
646
|
+
describe('customize keyboard shortcuts', function () {
|
|
647
|
+
function openHotkeysDialog() {
|
|
648
|
+
runs(function () {
|
|
649
|
+
$('.h-user-dropdown-link').click();
|
|
650
|
+
$('a.h-edit-hotkeys').click();
|
|
651
|
+
});
|
|
652
|
+
girderTest.waitForDialog();
|
|
653
|
+
waitsFor(function () {
|
|
654
|
+
return $('.h-hotkey-row[data-action="draw.rectangle"]').length > 0;
|
|
655
|
+
}, 'hotkey dialog to render');
|
|
656
|
+
}
|
|
657
|
+
function pressKey(key) {
|
|
658
|
+
// the dialog listens with a native capture listener
|
|
659
|
+
var evt;
|
|
660
|
+
try {
|
|
661
|
+
evt = new KeyboardEvent('keydown', {key: key, bubbles: true, cancelable: true});
|
|
662
|
+
} catch (err) {
|
|
663
|
+
evt = document.createEvent('Event');
|
|
664
|
+
evt.initEvent('keydown', true, true);
|
|
665
|
+
Object.defineProperty(evt, 'key', {value: key});
|
|
666
|
+
}
|
|
667
|
+
document.dispatchEvent(evt);
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
openHotkeysDialog();
|
|
671
|
+
it('rebind draw rectangle to x', function () {
|
|
672
|
+
runs(function () {
|
|
673
|
+
expect($('.h-hotkey-row[data-action="draw.rectangle"] kbd').text()).toBe('R');
|
|
674
|
+
var enter = $.Event('keydown', {key: 'Enter'});
|
|
675
|
+
$('.h-hotkeys-filter').trigger(enter);
|
|
676
|
+
expect(enter.isDefaultPrevented()).toBe(true);
|
|
677
|
+
$('.h-hotkey-row[data-action="draw.rectangle"] .h-hotkey-change').click();
|
|
678
|
+
expect($('.h-hotkey-capturing').length).toBe(1);
|
|
679
|
+
pressKey('x');
|
|
680
|
+
expect($('.h-hotkey-row[data-action="draw.rectangle"] kbd').text()).toBe('X');
|
|
681
|
+
expect($('.h-hotkey-row[data-action="draw.rectangle"] .h-hotkey-source').text()).toBe('custom');
|
|
682
|
+
$('.h-submit').click();
|
|
683
|
+
});
|
|
684
|
+
girderTest.waitForLoad();
|
|
685
|
+
runs(function () {
|
|
686
|
+
$('.h-image-body').trigger($.Event('keydown', {key: 'x'}));
|
|
687
|
+
expect($('.h-draw.active').attr('data-type')).toBe('rectangle');
|
|
688
|
+
$('.h-image-body').trigger($.Event('keydown', {key: 'x'}));
|
|
689
|
+
expect($('.h-draw.active').length).toBe(0);
|
|
690
|
+
$('.h-image-body').trigger($.Event('keydown', {key: 'r'}));
|
|
691
|
+
expect($('.h-draw.active').length).toBe(0);
|
|
692
|
+
expect($('button.h-draw[data-type="rectangle"]').attr('title')).toBe('Draw a new rectangle (keyboard shortcut: X)');
|
|
693
|
+
});
|
|
694
|
+
var userConfig;
|
|
695
|
+
runs(function () {
|
|
696
|
+
girder.rest.restRequest({
|
|
697
|
+
url: 'user/' + girder.auth.getCurrentUser().id + '/yaml_config/.histomicsui_user_config.yaml'
|
|
698
|
+
}).done(function (result) {
|
|
699
|
+
userConfig = result;
|
|
700
|
+
});
|
|
701
|
+
});
|
|
702
|
+
waitsFor(function () {
|
|
703
|
+
return userConfig !== undefined;
|
|
704
|
+
}, 'user config to load');
|
|
705
|
+
runs(function () {
|
|
706
|
+
expect(userConfig.hotkeys).toEqual([{action: 'draw.rectangle', key: 'x'}]);
|
|
707
|
+
});
|
|
708
|
+
});
|
|
709
|
+
openHotkeysDialog();
|
|
710
|
+
it('reset all keyboard shortcuts', function () {
|
|
711
|
+
runs(function () {
|
|
712
|
+
var list = $('.h-hotkeys-list');
|
|
713
|
+
expect(list[0].scrollHeight).toBeGreaterThan(list.innerHeight());
|
|
714
|
+
list.scrollTop(200);
|
|
715
|
+
$('.h-hotkey-row[data-action="layer.20"] .h-hotkey-clear').click();
|
|
716
|
+
expect($('.h-hotkeys-list').scrollTop()).toBe(200);
|
|
717
|
+
$('.h-hotkey-row[data-action="layer.20"] .h-hotkey-change').click();
|
|
718
|
+
pressKey('x');
|
|
719
|
+
expect($('.h-hotkeys-message').text()).toBe('X was removed from "Draw a rectangle".');
|
|
720
|
+
expect($('.modal-footer')[0].getBoundingClientRect().bottom).not.toBeGreaterThan(window.innerHeight);
|
|
721
|
+
$('.h-hotkeys-reset-all').click();
|
|
722
|
+
expect($('.h-hotkey-row[data-action="draw.rectangle"] kbd').text()).toBe('R');
|
|
723
|
+
$('.h-submit').click();
|
|
724
|
+
});
|
|
725
|
+
girderTest.waitForLoad();
|
|
726
|
+
runs(function () {
|
|
727
|
+
$('.h-image-body').trigger($.Event('keydown', {key: 'r'}));
|
|
728
|
+
expect($('.h-draw.active').attr('data-type')).toBe('rectangle');
|
|
729
|
+
$('.h-image-body').trigger($.Event('keydown', {key: 'r'}));
|
|
730
|
+
expect($('.h-draw.active').length).toBe(0);
|
|
731
|
+
});
|
|
732
|
+
});
|
|
733
|
+
});
|
|
646
734
|
});
|
|
647
735
|
|
|
648
736
|
describe('Sort By', function () {
|
|
@@ -1720,6 +1808,24 @@ girderTest.promise.done(function () {
|
|
|
1720
1808
|
girderTest.waitForLoad();
|
|
1721
1809
|
});
|
|
1722
1810
|
|
|
1811
|
+
it('edit the user hotkey file directly', function () {
|
|
1812
|
+
var done;
|
|
1813
|
+
runs(function () {
|
|
1814
|
+
girder.rest.restRequest({
|
|
1815
|
+
url: 'user/' + girder.auth.getCurrentUser().id + '/yaml_config/.histomicsui_user_config.yaml',
|
|
1816
|
+
method: 'PUT',
|
|
1817
|
+
contentType: 'application/x-yaml',
|
|
1818
|
+
processData: false,
|
|
1819
|
+
data: 'hotkeys:\n - action: draw.rectangle\n key: y\n'
|
|
1820
|
+
}).done(function () {
|
|
1821
|
+
done = true;
|
|
1822
|
+
});
|
|
1823
|
+
});
|
|
1824
|
+
waitsFor(function () {
|
|
1825
|
+
return done;
|
|
1826
|
+
}, 'user config to save');
|
|
1827
|
+
});
|
|
1828
|
+
|
|
1723
1829
|
it('open a different image', function () {
|
|
1724
1830
|
huiTest.waitsForPromise(
|
|
1725
1831
|
huiTest.openImage('copy').done(function () {
|
|
@@ -1728,6 +1834,27 @@ girderTest.promise.done(function () {
|
|
|
1728
1834
|
);
|
|
1729
1835
|
});
|
|
1730
1836
|
|
|
1837
|
+
it('loads the user hotkey file with the image', function () {
|
|
1838
|
+
var done;
|
|
1839
|
+
waitsFor(function () {
|
|
1840
|
+
return girder.plugins.histomicsui.hotkeys.hotkeyText('draw.rectangle', huiTest.app.bodyView.hotkeys) === 'Y';
|
|
1841
|
+
}, 'user hotkeys to load');
|
|
1842
|
+
runs(function () {
|
|
1843
|
+
girder.rest.restRequest({
|
|
1844
|
+
url: 'user/' + girder.auth.getCurrentUser().id + '/yaml_config/.histomicsui_user_config.yaml',
|
|
1845
|
+
method: 'PUT',
|
|
1846
|
+
contentType: 'application/x-yaml',
|
|
1847
|
+
processData: false,
|
|
1848
|
+
data: '{}\n'
|
|
1849
|
+
}).done(function () {
|
|
1850
|
+
done = true;
|
|
1851
|
+
});
|
|
1852
|
+
});
|
|
1853
|
+
waitsFor(function () {
|
|
1854
|
+
return done;
|
|
1855
|
+
}, 'user config to reset');
|
|
1856
|
+
});
|
|
1857
|
+
|
|
1731
1858
|
it('open the original image', function () {
|
|
1732
1859
|
huiTest.waitsForPromise(
|
|
1733
1860
|
huiTest.openImage('image').done(function () {
|
|
@@ -2187,8 +2314,22 @@ girderTest.promise.done(function () {
|
|
|
2187
2314
|
return $('.h-annotation-selector .h-annotation:contains("drawn c1")').length === 0;
|
|
2188
2315
|
}, '"drawn c1" to be deleted');
|
|
2189
2316
|
});
|
|
2317
|
+
it('uses group hotkeys from the config', function () {
|
|
2318
|
+
waitsFor(function () {
|
|
2319
|
+
var bindings = huiTest.app.bodyView.hotkeys.bindings['group:Red'];
|
|
2320
|
+
return bindings && bindings.length === 1;
|
|
2321
|
+
}, 'config hotkeys to load');
|
|
2322
|
+
runs(function () {
|
|
2323
|
+
expect(girder.plugins.histomicsui.hotkeys.hotkeyText('group:Red', huiTest.app.bodyView.hotkeys)).toBe('Shift+R');
|
|
2324
|
+
});
|
|
2325
|
+
});
|
|
2190
2326
|
it('open original image', function () {
|
|
2191
2327
|
huiTest.openImage('image');
|
|
2192
2328
|
});
|
|
2329
|
+
it('drops config hotkeys in a folder without a config', function () {
|
|
2330
|
+
waitsFor(function () {
|
|
2331
|
+
return huiTest.app.bodyView.hotkeys.bindings['group:Red'] === undefined;
|
|
2332
|
+
}, 'config hotkeys to be removed');
|
|
2333
|
+
});
|
|
2193
2334
|
});
|
|
2194
2335
|
});
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/* global girderTest describe it expect girder $ */
|
|
2
|
+
|
|
3
|
+
girderTest.importPlugin('jobs', 'large_image', 'large_image_annotation', 'slicer_cli_web', 'histomicsui');
|
|
4
|
+
|
|
5
|
+
girderTest.promise.done(function () {
|
|
6
|
+
var hotkeys = girder.plugins.histomicsui.hotkeys;
|
|
7
|
+
|
|
8
|
+
// A keyboard event with only the properties the hotkeys module reads.
|
|
9
|
+
function ev(key, mods) {
|
|
10
|
+
return $.extend({key: key}, mods || {});
|
|
11
|
+
}
|
|
12
|
+
function fk(evt) {
|
|
13
|
+
return hotkeys.formatKey(hotkeys.bindingFromEvent(evt));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
describe('Hotkeys module', function () {
|
|
17
|
+
describe('parsing and formatting', function () {
|
|
18
|
+
it('parses key strings', function () {
|
|
19
|
+
expect(hotkeys.formatKey(hotkeys.parseKey('S'))).toBe('shift+s');
|
|
20
|
+
expect(hotkeys.formatKey(hotkeys.parseKey('ctrl-alt-x'))).toBe('ctrl+alt+x');
|
|
21
|
+
expect(hotkeys.formatKey(hotkeys.parseKey('shift+-'))).toBe('-');
|
|
22
|
+
expect(hotkeys.formatKey(hotkeys.parseKey('ctrl++'))).toBe('ctrl+plus');
|
|
23
|
+
expect(hotkeys.formatKey(hotkeys.parseKey('ArrowLeft'))).toBe('left');
|
|
24
|
+
expect(hotkeys.parseKey('')).toBe(null);
|
|
25
|
+
});
|
|
26
|
+
it('applies explicit modifiers from a config entry', function () {
|
|
27
|
+
expect(hotkeys.formatKey(hotkeys.parseKey('r', {ctrl: true}))).toBe('ctrl+r');
|
|
28
|
+
});
|
|
29
|
+
it('formats keys for display', function () {
|
|
30
|
+
expect(hotkeys.displayKey(hotkeys.parseKey('ctrl+shift+s'))).toBe('Ctrl+Shift+S');
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
describe('keyboard events', function () {
|
|
35
|
+
it('reads keys from events', function () {
|
|
36
|
+
expect(fk(ev('S'))).toBe('shift+s');
|
|
37
|
+
expect(fk(ev('<', {shiftKey: true}))).toBe('<');
|
|
38
|
+
expect(fk(ev(' '))).toBe('space');
|
|
39
|
+
expect(fk({originalEvent: {key: 'x', altKey: true}})).toBe('alt+x');
|
|
40
|
+
expect(hotkeys.bindingFromEvent(ev('Shift', {shiftKey: true}))).toBe(null);
|
|
41
|
+
expect(hotkeys.bindingFromEvent(ev('CapsLock'))).toBe(null);
|
|
42
|
+
expect(hotkeys.bindingFromEvent(ev('NumLock'))).toBe(null);
|
|
43
|
+
});
|
|
44
|
+
it('ignores shift and ctrl for sized navigation actions', function () {
|
|
45
|
+
expect(hotkeys.formatKey(hotkeys.bindingFromEvent(ev('H', {shiftKey: true, ctrlKey: true}), true))).toBe('h');
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
describe('resolution', function () {
|
|
50
|
+
it('dispatches the default keys', function () {
|
|
51
|
+
var r = hotkeys.resolveHotkeys();
|
|
52
|
+
expect(hotkeys.actionForEvent(r, ev('s'))).toEqual({action: 'select.rectangle'});
|
|
53
|
+
expect(hotkeys.actionForEvent(r, ev('S'))).toEqual({action: 'select.polygon'});
|
|
54
|
+
expect(hotkeys.actionForEvent(r, ev('Escape'))).toEqual({action: 'draw.cancel'});
|
|
55
|
+
expect(hotkeys.actionForEvent(r, ev('s', {ctrlKey: true}))).toBe(null);
|
|
56
|
+
expect(hotkeys.actionForEvent(r, ev('ArrowLeft'))).toBe(null);
|
|
57
|
+
expect(hotkeys.geojsKeyboardActions(r)).toEqual({});
|
|
58
|
+
});
|
|
59
|
+
it('uses config group hotkeys and modifiers', function () {
|
|
60
|
+
var r = hotkeys.resolveHotkeys({
|
|
61
|
+
config: [
|
|
62
|
+
{key: 't', action: 'group', param: 'tumor'},
|
|
63
|
+
{key: 'x', action: 'group', param: 'stroma', ctrl: true},
|
|
64
|
+
{key: 'z', action: 'unknown'}
|
|
65
|
+
]
|
|
66
|
+
});
|
|
67
|
+
expect(hotkeys.actionForEvent(r, ev('t'))).toEqual({action: 'group', param: 'tumor'});
|
|
68
|
+
expect(hotkeys.actionForEvent(r, ev('x'))).toBe(null);
|
|
69
|
+
expect(hotkeys.actionForEvent(r, ev('x', {ctrlKey: true}))).toEqual({action: 'group', param: 'stroma'});
|
|
70
|
+
expect(r.bindings.unknown).toBe(undefined);
|
|
71
|
+
});
|
|
72
|
+
it('lets config keys take keys from the defaults', function () {
|
|
73
|
+
var r = hotkeys.resolveHotkeys({config: [{key: 'r', action: 'group', param: 'Red'}]});
|
|
74
|
+
expect(hotkeys.actionForEvent(r, ev('r'))).toEqual({action: 'group', param: 'Red'});
|
|
75
|
+
expect(r.bindings['draw.rectangle']).toEqual([]);
|
|
76
|
+
});
|
|
77
|
+
it('applies user overrides over config', function () {
|
|
78
|
+
var r = hotkeys.resolveHotkeys({
|
|
79
|
+
config: [{key: 'r', action: 'draw.rectangle'}, {key: 't', action: 'group', param: 'A'}],
|
|
80
|
+
user: [
|
|
81
|
+
{key: 'x', action: 'draw.rectangle'},
|
|
82
|
+
{key: null, action: 'draw.point'},
|
|
83
|
+
{key: 't', action: 'draw.line'}
|
|
84
|
+
]
|
|
85
|
+
});
|
|
86
|
+
expect(hotkeys.actionForEvent(r, ev('x'))).toEqual({action: 'draw.rectangle'});
|
|
87
|
+
expect(hotkeys.actionForEvent(r, ev('r'))).toBe(null);
|
|
88
|
+
expect(hotkeys.actionForEvent(r, ev('o'))).toBe(null);
|
|
89
|
+
expect(hotkeys.actionForEvent(r, ev('t'))).toEqual({action: 'draw.line'});
|
|
90
|
+
expect(r.bindings['group:A']).toEqual([]);
|
|
91
|
+
expect(r.source['draw.rectangle']).toBe('user');
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
describe('geojs and frame selector keys', function () {
|
|
96
|
+
it('expands rebound navigation keys for geojs', function () {
|
|
97
|
+
var r = hotkeys.resolveHotkeys({
|
|
98
|
+
user: [
|
|
99
|
+
{key: 'h', action: 'pan.left'},
|
|
100
|
+
{key: '1', action: 'group', param: 'Tumor'}
|
|
101
|
+
]
|
|
102
|
+
});
|
|
103
|
+
expect(hotkeys.geojsKeyboardActions(r)).toEqual({
|
|
104
|
+
'pan.left': ['h', 'shift+h', 'ctrl+shift+h'],
|
|
105
|
+
'zoom.0': []
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
it('maps the default layer keys', function () {
|
|
109
|
+
var lh = hotkeys.layerHotkeys(hotkeys.resolveHotkeys());
|
|
110
|
+
expect(lh.layerForEvent(ev('1', {ctrlKey: true}))).toBe(0);
|
|
111
|
+
expect(lh.layerForEvent(ev('0', {ctrlKey: true}))).toBe(9);
|
|
112
|
+
expect(lh.layerForEvent(ev('1', {ctrlKey: true, altKey: true}))).toBe(10);
|
|
113
|
+
expect(lh.layerForEvent(ev('1'))).toBe(undefined);
|
|
114
|
+
expect(lh.labels[0]).toBe('Ctrl+1');
|
|
115
|
+
expect(lh.labels[19]).toBe('Ctrl+Alt+0');
|
|
116
|
+
});
|
|
117
|
+
it('maps rebound layer keys', function () {
|
|
118
|
+
var r = hotkeys.resolveHotkeys({
|
|
119
|
+
user: [
|
|
120
|
+
{action: 'layer.1', key: 'alt+q'},
|
|
121
|
+
{action: 'draw.point', key: 'ctrl+2'}
|
|
122
|
+
]
|
|
123
|
+
});
|
|
124
|
+
var lh = hotkeys.layerHotkeys(r);
|
|
125
|
+
expect(lh.layerForEvent(ev('q', {altKey: true}))).toBe(0);
|
|
126
|
+
expect(lh.layerForEvent(ev('1', {ctrlKey: true}))).toBe(undefined);
|
|
127
|
+
expect(lh.layerForEvent(ev('2', {ctrlKey: true}))).toBe(undefined);
|
|
128
|
+
expect(hotkeys.actionForEvent(r, ev('2', {ctrlKey: true}))).toEqual({action: 'draw.point'});
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
describe('user file entries and titles', function () {
|
|
133
|
+
it('converts overrides to entries and back', function () {
|
|
134
|
+
var entries = hotkeys.overridesToEntries(
|
|
135
|
+
{'draw.point': [], 'group:tumor': [hotkeys.parseKey('ctrl+t')]},
|
|
136
|
+
{'group:tumor': {action: 'group', param: 'tumor'}});
|
|
137
|
+
expect(entries).toEqual([
|
|
138
|
+
{action: 'draw.point', key: null},
|
|
139
|
+
{action: 'group', param: 'tumor', key: 'ctrl+t'}
|
|
140
|
+
]);
|
|
141
|
+
var r = hotkeys.resolveHotkeys({user: entries});
|
|
142
|
+
expect(hotkeys.actionForEvent(r, ev('t', {ctrlKey: true}))).toEqual({action: 'group', param: 'tumor'});
|
|
143
|
+
expect(r.bindings['draw.point']).toEqual([]);
|
|
144
|
+
});
|
|
145
|
+
it('fills keys into element titles', function () {
|
|
146
|
+
var el = document.createElement('div');
|
|
147
|
+
el.innerHTML = '<span data-hotkey-title="Select {select.rectangle}; {select.polygon}; {nope}"></span>';
|
|
148
|
+
hotkeys.setCurrentHotkeys(hotkeys.resolveHotkeys({user: [{action: 'select.rectangle', key: 'k'}]}));
|
|
149
|
+
hotkeys.applyHotkeyTitles(el);
|
|
150
|
+
expect(el.firstChild.getAttribute('title')).toBe('Select K; Shift+S; none');
|
|
151
|
+
hotkeys.setCurrentHotkeys(hotkeys.resolveHotkeys());
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/docs/annotation_group_restrictions.rst
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui/rest/image_browse_resource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/histomicsui.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/test_files/sample_girder_id.anot
RENAMED
|
File without changes
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/test_files/test_analysis_detection.xml
RENAMED
|
File without changes
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/test_files/test_analysis_features.xml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/girderUISpec.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/metadataPanelSpec.js
RENAMED
|
File without changes
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/metadataPlotSpec.js
RENAMED
|
File without changes
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/overviewPanelSpec.js
RENAMED
|
File without changes
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/panelLayoutSpec.js
RENAMED
|
File without changes
|
{histomicsui-1.8.1.dev225 → histomicsui-1.8.1.dev253}/tests/web_client_specs/pixelmapCategorySpec.js
RENAMED
|
File without changes
|
|
File without changes
|