@wwtelescope/webclient 6.4.0 → 6.4.1
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.
- package/CHANGELOG.md +6 -0
- package/README.md +5 -9
- package/ci/azure-deployment.yml +3 -3
- package/controllers/MainController.js +25 -31
- package/controllers/modals/DataVizController.js +10 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
# @wwtelescope/webclient 6.4.1 (2023-02-15)
|
|
2
|
+
|
|
3
|
+
- Make sliders in layer properties window be initialized with the correct value
|
|
4
|
+
(#354, @Carifio24).
|
|
5
|
+
|
|
6
|
+
|
|
1
7
|
# @wwtelescope/webclient 6.4.0 (2022-07-12)
|
|
2
8
|
|
|
3
9
|
- Finally update this to expose all of our new datasets (@pkgw, #353)! These
|
package/README.md
CHANGED
|
@@ -20,14 +20,10 @@ JavaScript library.
|
|
|
20
20
|
|
|
21
21
|
## Building and Testing
|
|
22
22
|
|
|
23
|
-
In order to build and test the app, you need:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
[nodejs.org](https://nodejs.org/) for installation instructions.
|
|
28
|
-
2. The [Grunt](https://gruntjs.com/) task runner, specifically the `grunt`
|
|
29
|
-
command. Once again, install it using your operating system’s package
|
|
30
|
-
manager or [see the Grunt website](https://gruntjs.com/getting-started).
|
|
23
|
+
In order to build and test the app, you need: [Node.js](https://nodejs.org/),
|
|
24
|
+
specifically the `npm` command. If you need to install Node.js, use your
|
|
25
|
+
operating system’s package manager or visit [nodejs.org](https://nodejs.org/)
|
|
26
|
+
for installation instructions.
|
|
31
27
|
|
|
32
28
|
The first time you check out these files, run:
|
|
33
29
|
|
|
@@ -38,7 +34,7 @@ npm install
|
|
|
38
34
|
Once that has been done, you can build the website with:
|
|
39
35
|
|
|
40
36
|
```
|
|
41
|
-
grunt dist-dev
|
|
37
|
+
npx grunt dist-dev
|
|
42
38
|
```
|
|
43
39
|
|
|
44
40
|
This will create the app files in the `dist` subdirectory of your repository
|
package/ci/azure-deployment.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2020-
|
|
1
|
+
# Copyright 2020-2023 the .NET Foundation
|
|
2
2
|
# Licensed under the MIT License
|
|
3
3
|
|
|
4
4
|
parameters:
|
|
@@ -85,11 +85,11 @@ jobs:
|
|
|
85
85
|
azurePowerShellVersion: 'LatestVersion'
|
|
86
86
|
scriptType: 'inlineScript'
|
|
87
87
|
inline: |
|
|
88
|
-
|
|
88
|
+
Clear-AzCdnEndpointContent `
|
|
89
89
|
-ProfileName wwt-cdn-01 `
|
|
90
90
|
-ResourceGroupName wwt-web01 `
|
|
91
91
|
-EndpointName wwtweb-prod `
|
|
92
|
-
-
|
|
92
|
+
-ContentPath @('/$(WEBCLIENT_DEPLOYMENT_TAG)/*')
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
# Deployment jobs that should only happen on updates to `rc`, i.e.
|
|
@@ -33,9 +33,8 @@ wwt.controllers.controller(
|
|
|
33
33
|
'$popover',
|
|
34
34
|
|
|
35
35
|
function ($scope, $rootScope, uiLibrary, $q, appState, loc, $timeout, finderScope,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
{
|
|
36
|
+
searchDataService, places, util, hashManager, skyball, searchUtil, $modal,
|
|
37
|
+
$element, $cookies, AutohidePanels, $window, $popover) {
|
|
39
38
|
//TODO - figure out how to clean up lame long list of dependencies injected
|
|
40
39
|
var ctl;
|
|
41
40
|
|
|
@@ -136,7 +135,7 @@ wwt.controllers.controller(
|
|
|
136
135
|
};
|
|
137
136
|
|
|
138
137
|
$scope.setLookAt = function (lookAt, imageryName, noUpdate, keepCamera) {
|
|
139
|
-
if (!lookAt || !isNaN(parseInt(lookAt))){
|
|
138
|
+
if (!lookAt || !isNaN(parseInt(lookAt))) {
|
|
140
139
|
lookAt = wwtlib.WWTControl.singleton.renderContext.get_backgroundImageset()._dataSetType;
|
|
141
140
|
lookAt = $scope.lookTypes[lookAt];
|
|
142
141
|
if ($scope.lookAt === lookAt) {
|
|
@@ -184,7 +183,7 @@ wwt.controllers.controller(
|
|
|
184
183
|
}
|
|
185
184
|
}
|
|
186
185
|
|
|
187
|
-
angular.element($window).bind('resize', function() {
|
|
186
|
+
angular.element($window).bind('resize', function () {
|
|
188
187
|
$rootScope.$apply(update_window_size);
|
|
189
188
|
});
|
|
190
189
|
|
|
@@ -559,7 +558,7 @@ wwt.controllers.controller(
|
|
|
559
558
|
}
|
|
560
559
|
}
|
|
561
560
|
|
|
562
|
-
var placeNameForQueryString = function(item) {
|
|
561
|
+
var placeNameForQueryString = function (item) {
|
|
563
562
|
// Various "research" menus like to put an item's name into URL query
|
|
564
563
|
// strings. Compute the proper (well, good-enough) representation. When
|
|
565
564
|
// the name has multiple semicolon-separated identifiers, usually the
|
|
@@ -595,8 +594,8 @@ wwt.controllers.controller(
|
|
|
595
594
|
});
|
|
596
595
|
|
|
597
596
|
var finderTimer,
|
|
598
|
-
|
|
599
|
-
|
|
597
|
+
finderActive = false,
|
|
598
|
+
finderMoved = true;
|
|
600
599
|
|
|
601
600
|
$scope.showFinderScope = function (event) {
|
|
602
601
|
// On Windows, right-click brings up the finder scope and control-click
|
|
@@ -646,14 +645,14 @@ wwt.controllers.controller(
|
|
|
646
645
|
}
|
|
647
646
|
|
|
648
647
|
finderTimer = setInterval(pollFinder, 400);
|
|
649
|
-
viewportChange(null, {finderMove: true});
|
|
648
|
+
viewportChange(null, { finderMove: true });
|
|
650
649
|
}
|
|
651
650
|
};
|
|
652
651
|
|
|
653
652
|
var pollFinder = function () {
|
|
654
653
|
if (checkVisibleFinderScope()) {
|
|
655
654
|
if (finderMoved) {
|
|
656
|
-
viewportChange(null, {finderMove: true});
|
|
655
|
+
viewportChange(null, { finderMove: true });
|
|
657
656
|
finderMoved = false;
|
|
658
657
|
}
|
|
659
658
|
}
|
|
@@ -734,11 +733,6 @@ wwt.controllers.controller(
|
|
|
734
733
|
}
|
|
735
734
|
};
|
|
736
735
|
|
|
737
|
-
$scope.setSurveyProperties = function () {
|
|
738
|
-
$scope.propertyItem = $scope.backgroundImagery;
|
|
739
|
-
$scope.propertyItem.isSurvey = true;
|
|
740
|
-
};
|
|
741
|
-
|
|
742
736
|
$scope.setActiveItem = function (item) {
|
|
743
737
|
$scope.activeItem = item;
|
|
744
738
|
if (item.guid) {
|
|
@@ -749,7 +743,7 @@ wwt.controllers.controller(
|
|
|
749
743
|
$scope.activeItem.imageSet = item.get_studyImageset();
|
|
750
744
|
}
|
|
751
745
|
};
|
|
752
|
-
|
|
746
|
+
|
|
753
747
|
$scope.addCatalogHiPS = function (item) {
|
|
754
748
|
if (item.guid) {
|
|
755
749
|
$scope.shareUrl = hashManager.setHashVal('place', item.guid, true, true);
|
|
@@ -769,7 +763,7 @@ wwt.controllers.controller(
|
|
|
769
763
|
};
|
|
770
764
|
|
|
771
765
|
$scope.setForegroundImage = function (item) {
|
|
772
|
-
if(item.isCatalogHips){
|
|
766
|
+
if (item.isCatalogHips) {
|
|
773
767
|
$scope.addCatalogHiPS(item);
|
|
774
768
|
return;
|
|
775
769
|
}
|
|
@@ -800,7 +794,7 @@ wwt.controllers.controller(
|
|
|
800
794
|
};
|
|
801
795
|
|
|
802
796
|
$scope.setBackgroundImage = function (item) {
|
|
803
|
-
if(item.isCatalogHips){
|
|
797
|
+
if (item.isCatalogHips) {
|
|
804
798
|
$scope.addCatalogHiPS(item);
|
|
805
799
|
return;
|
|
806
800
|
}
|
|
@@ -933,21 +927,21 @@ wwt.controllers.controller(
|
|
|
933
927
|
$scope.playTour = function (url, edit) {
|
|
934
928
|
$('.finder-scope').hide();
|
|
935
929
|
|
|
936
|
-
wwt.wc.add_tourError(function(e) {
|
|
930
|
+
wwt.wc.add_tourError(function (e) {
|
|
937
931
|
util.exitFullscreen();
|
|
938
|
-
$scope.$applyAsync(function() {
|
|
932
|
+
$scope.$applyAsync(function () {
|
|
939
933
|
wwt.tourPlaying = $rootScope.tourPlaying = false;
|
|
940
934
|
});
|
|
941
935
|
uiLibrary.showErrorMessage('There was an error loading this tour. The tour file may be damaged or inaccessible.');
|
|
942
|
-
console.warn('Tour error'
|
|
936
|
+
console.warn('Tour error', $scope, e);
|
|
943
937
|
});
|
|
944
938
|
|
|
945
939
|
wwt.wc.add_tourReady(function () {
|
|
946
|
-
console.log({ready:wwtlib.WWTControl.singleton.tourEdit});
|
|
940
|
+
console.log({ ready: wwtlib.WWTControl.singleton.tourEdit });
|
|
947
941
|
|
|
948
942
|
$scope.$applyAsync(function () {
|
|
949
943
|
$scope.isLoading = false;
|
|
950
|
-
$scope.activeItem = {label: 'currentTour'};
|
|
944
|
+
$scope.activeItem = { label: 'currentTour' };
|
|
951
945
|
$scope.activePanel = 'currentTour';
|
|
952
946
|
$scope.ribbon.tabs[1].menu['Edit Tour'] = [$scope.editTour];
|
|
953
947
|
});
|
|
@@ -1009,7 +1003,7 @@ wwt.controllers.controller(
|
|
|
1009
1003
|
//todo show dialog for tour properties
|
|
1010
1004
|
$rootScope.currentTour = wwtlib.WWTControl.singleton.createTour("New Tour");
|
|
1011
1005
|
|
|
1012
|
-
$scope.activeItem = {label: 'currentTour'};
|
|
1006
|
+
$scope.activeItem = { label: 'currentTour' };
|
|
1013
1007
|
$scope.activePanel = 'currentTour';
|
|
1014
1008
|
$rootScope.$applyAsync(function () {
|
|
1015
1009
|
$rootScope.editingTour = true;
|
|
@@ -1179,9 +1173,9 @@ wwt.controllers.controller(
|
|
|
1179
1173
|
$scope.homePrefChange = function (isWebclient) {
|
|
1180
1174
|
$cookies.remove('homepage');
|
|
1181
1175
|
if (!isWebclient) {
|
|
1182
|
-
$cookies.put('homepage', 'home', {expires: new Date(2050, 1, 1), path: "/"});
|
|
1176
|
+
$cookies.put('homepage', 'home', { expires: new Date(2050, 1, 1), path: "/" });
|
|
1183
1177
|
} else {
|
|
1184
|
-
$cookies.put('homepage', 'webclient', {expires: new Date(2050, 1, 1), path: "/"});
|
|
1178
|
+
$cookies.put('homepage', 'webclient', { expires: new Date(2050, 1, 1), path: "/" });
|
|
1185
1179
|
}
|
|
1186
1180
|
};
|
|
1187
1181
|
|
|
@@ -1227,9 +1221,9 @@ wwt.controllers.controller(
|
|
|
1227
1221
|
$scope.displayXFader = function () {
|
|
1228
1222
|
return (
|
|
1229
1223
|
$scope.lookAt === 'Sky' &&
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1224
|
+
$scope.trackingObj &&
|
|
1225
|
+
!$scope.tourPlaying &&
|
|
1226
|
+
($scope.trackingObj.get_backgroundImageset() != null || $scope.trackingObj.get_studyImageset() != null)
|
|
1233
1227
|
);
|
|
1234
1228
|
}
|
|
1235
1229
|
|
|
@@ -1294,7 +1288,7 @@ wwt.controllers.controller(
|
|
|
1294
1288
|
$scope.fovClass = function () {
|
|
1295
1289
|
return $scope.lookAt === 'Planet' || $scope.lookAt === 'Panorama' || $scope.lookAt === 'Earth' ? 'hide' :
|
|
1296
1290
|
$scope.lookAt === 'SolarSystem' ? 'solar-system-mode fov-panel' :
|
|
1297
|
-
|
|
1291
|
+
'fov-panel';
|
|
1298
1292
|
}
|
|
1299
1293
|
|
|
1300
1294
|
$scope.contextPanelClass = function () {
|
|
@@ -1303,7 +1297,7 @@ wwt.controllers.controller(
|
|
|
1303
1297
|
cls += ' hide';
|
|
1304
1298
|
}
|
|
1305
1299
|
|
|
1306
|
-
$rootScope.compressed = $scope.compressed = cls.indexOf('compressed')>0;
|
|
1300
|
+
$rootScope.compressed = $scope.compressed = cls.indexOf('compressed') > 0;
|
|
1307
1301
|
return cls;
|
|
1308
1302
|
}
|
|
1309
1303
|
|
|
@@ -52,7 +52,6 @@ wwt.controllers.controller('DataVizController', ['$scope', '$rootScope', 'Util',
|
|
|
52
52
|
return {label: c, type: i};
|
|
53
53
|
});
|
|
54
54
|
l.computeDateDomainRange(0,-1);
|
|
55
|
-
console.log('compute');
|
|
56
55
|
var none = {label: 'None', index: -1};
|
|
57
56
|
$scope.columns.splice(0, 0, none);
|
|
58
57
|
l.psType = l.get_pointScaleType();
|
|
@@ -61,12 +60,21 @@ wwt.controllers.controller('DataVizController', ['$scope', '$rootScope', 'Util',
|
|
|
61
60
|
|
|
62
61
|
var sliders = {};
|
|
63
62
|
var initExpSlider = function (sel, prop, initVal) {
|
|
64
|
-
$scope[prop]
|
|
63
|
+
var value = $scope[prop];
|
|
64
|
+
if (value == null) {
|
|
65
|
+
value = l['get_' + prop]();
|
|
66
|
+
if (value == null) {
|
|
67
|
+
value = initVal;
|
|
68
|
+
}
|
|
69
|
+
$scope[prop] = value;
|
|
70
|
+
}
|
|
65
71
|
if (sliders[prop]) {
|
|
66
72
|
return;
|
|
67
73
|
}
|
|
68
74
|
setTimeout(function () {
|
|
69
75
|
var bar = $(sel);
|
|
76
|
+
var pxValue = 4 * Math.round(Math.log2(value)) + 50;
|
|
77
|
+
bar[0].style.left = pxValue.toString() + 'px';
|
|
70
78
|
var off = parseInt(bar.css('left').replace('px', ''));
|
|
71
79
|
sliders[prop] = new wwt.Move({
|
|
72
80
|
el: bar,
|
package/package.json
CHANGED