@corpsmap/corpsmap 3.0.8 → 3.0.9
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/lib/dev.js +116 -17
- package/lib/prod.js +116 -17
- package/package.json +1 -1
- package/src/application-bundles/map-view-bundle.js +5 -3
- package/src/core-plugins/tree-view/layer-subpanel/layer-subpanel.js +5 -2
- package/src/core-plugins/zoom-level/bundle.js +32 -0
- package/src/core-plugins/zoom-level/index.js +16 -0
- package/src/core-plugins/zoom-level/zoom-indicator.js +35 -0
- package/src/index.js +3 -0
package/lib/dev.js
CHANGED
|
@@ -103733,7 +103733,8 @@ var mapViewBundle = {
|
|
|
103733
103733
|
maxZoom: 22,
|
|
103734
103734
|
action: null,
|
|
103735
103735
|
updating: false,
|
|
103736
|
-
listening: false
|
|
103736
|
+
listening: false,
|
|
103737
|
+
shouldUpdateZoom: false
|
|
103737
103738
|
};
|
|
103738
103739
|
return function () {
|
|
103739
103740
|
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialData;
|
|
@@ -103899,9 +103900,12 @@ var mapViewBundle = {
|
|
|
103899
103900
|
dispatch({
|
|
103900
103901
|
type: "VIEW_START_ACTION"
|
|
103901
103902
|
});
|
|
103902
|
-
var view = store.selectView();
|
|
103903
|
-
|
|
103904
|
-
|
|
103903
|
+
var view = store.selectView(); // pulling view
|
|
103904
|
+
|
|
103905
|
+
var currentZoom = view.getZoom(); // getting current view
|
|
103906
|
+
|
|
103907
|
+
animateView( // subtract 1 from current zoom
|
|
103908
|
+
{
|
|
103905
103909
|
zoom: currentZoom - 1
|
|
103906
103910
|
}, view);
|
|
103907
103911
|
dispatch({
|
|
@@ -105331,7 +105335,7 @@ var config = {
|
|
|
105331
105335
|
};
|
|
105332
105336
|
|
|
105333
105337
|
var name = "@corpsmap/corpsmap";
|
|
105334
|
-
var version$1 = "3.0.
|
|
105338
|
+
var version$1 = "3.0.9";
|
|
105335
105339
|
var description = "CorpsMap as React Components";
|
|
105336
105340
|
var main = "index.js";
|
|
105337
105341
|
var scripts = {
|
|
@@ -158397,6 +158401,100 @@ var plugin$j = {
|
|
|
158397
158401
|
}]
|
|
158398
158402
|
};
|
|
158399
158403
|
|
|
158404
|
+
var zoomIndicator = /*#__PURE__*/function (_React$Component) {
|
|
158405
|
+
_inherits(zoomIndicator, _React$Component);
|
|
158406
|
+
|
|
158407
|
+
var _super = _createSuper(zoomIndicator);
|
|
158408
|
+
|
|
158409
|
+
function zoomIndicator(props) {
|
|
158410
|
+
var _this;
|
|
158411
|
+
|
|
158412
|
+
_classCallCheck(this, zoomIndicator);
|
|
158413
|
+
|
|
158414
|
+
_this = _super.call(this, props);
|
|
158415
|
+
_this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
|
|
158416
|
+
return _this;
|
|
158417
|
+
}
|
|
158418
|
+
|
|
158419
|
+
_createClass(zoomIndicator, [{
|
|
158420
|
+
key: "handleClick",
|
|
158421
|
+
value: function handleClick() {}
|
|
158422
|
+
}, {
|
|
158423
|
+
key: "render",
|
|
158424
|
+
value: function render() {
|
|
158425
|
+
var _this$props = this.props,
|
|
158426
|
+
mapZoom = _this$props.mapZoom,
|
|
158427
|
+
zoomLevelIndicator = _this$props.zoomLevelIndicator;
|
|
158428
|
+
|
|
158429
|
+
if (zoomLevelIndicator == true) {
|
|
158430
|
+
return /*#__PURE__*/React$1__default.createElement(SidebarButton$1, {
|
|
158431
|
+
iconText: Math.floor(mapZoom),
|
|
158432
|
+
label: "Zoom-Indicator",
|
|
158433
|
+
title: "Zoom-Indicator",
|
|
158434
|
+
onClick: this.handleClick
|
|
158435
|
+
});
|
|
158436
|
+
} else {
|
|
158437
|
+
return null;
|
|
158438
|
+
}
|
|
158439
|
+
}
|
|
158440
|
+
}]);
|
|
158441
|
+
|
|
158442
|
+
return zoomIndicator;
|
|
158443
|
+
}(React$1__default.Component);
|
|
158444
|
+
|
|
158445
|
+
var zoomIndicator$1 = connect('doZoomIndicatorActivate', 'selectMapZoom', 'selectZoomLevelIndicator', zoomIndicator);
|
|
158446
|
+
|
|
158447
|
+
var bundle$f = {
|
|
158448
|
+
name: "zoomLevel",
|
|
158449
|
+
getReducer: function getReducer() {
|
|
158450
|
+
var initialData = {
|
|
158451
|
+
zoomLevelIndicator: false
|
|
158452
|
+
};
|
|
158453
|
+
return function () {
|
|
158454
|
+
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialData;
|
|
158455
|
+
|
|
158456
|
+
var _ref = arguments.length > 1 ? arguments[1] : undefined,
|
|
158457
|
+
type = _ref.type,
|
|
158458
|
+
payload = _ref.payload;
|
|
158459
|
+
|
|
158460
|
+
switch (type) {
|
|
158461
|
+
case "ACTIVATE_ZOOM_INDICATOR":
|
|
158462
|
+
case "DEACTIVATE_ZOOM_INDICATOR":
|
|
158463
|
+
return Object.assign({}, state, payload);
|
|
158464
|
+
|
|
158465
|
+
default:
|
|
158466
|
+
return state;
|
|
158467
|
+
}
|
|
158468
|
+
};
|
|
158469
|
+
},
|
|
158470
|
+
doZoomIndicatorActivate: function doZoomIndicatorActivate() {
|
|
158471
|
+
return function (_ref2) {
|
|
158472
|
+
var dispatch = _ref2.dispatch,
|
|
158473
|
+
store = _ref2.store;
|
|
158474
|
+
dispatch({
|
|
158475
|
+
type: "ACTIVATE_ZOOM_INDICATOR",
|
|
158476
|
+
payload: {
|
|
158477
|
+
zoomLevelIndicator: true
|
|
158478
|
+
}
|
|
158479
|
+
});
|
|
158480
|
+
};
|
|
158481
|
+
},
|
|
158482
|
+
selectZoomLevelIndicator: function selectZoomLevelIndicator(state) {
|
|
158483
|
+
return state.zoomLevel.zoomLevelIndicator;
|
|
158484
|
+
}
|
|
158485
|
+
};
|
|
158486
|
+
|
|
158487
|
+
var plugin$k = {
|
|
158488
|
+
pluginName: 'zoomIndicator',
|
|
158489
|
+
enabled: true,
|
|
158490
|
+
bundle: bundle$f,
|
|
158491
|
+
components: [{
|
|
158492
|
+
component: zoomIndicator$1,
|
|
158493
|
+
region: 'right-sidebar-top',
|
|
158494
|
+
sortOrder: 40
|
|
158495
|
+
}]
|
|
158496
|
+
};
|
|
158497
|
+
|
|
158400
158498
|
var ZoomHomeButton = /*#__PURE__*/function (_React$Component) {
|
|
158401
158499
|
_inherits(ZoomHomeButton, _React$Component);
|
|
158402
158500
|
|
|
@@ -158464,7 +158562,7 @@ var ZoomHomeButton = /*#__PURE__*/function (_React$Component) {
|
|
|
158464
158562
|
|
|
158465
158563
|
var ZoomHomeButton$1 = connect("doZoomHome", "doZoomHomeResetLoc", "doNotificationsFire", ZoomHomeButton);
|
|
158466
158564
|
|
|
158467
|
-
var bundle$
|
|
158565
|
+
var bundle$g = {
|
|
158468
158566
|
name: "zoomHome",
|
|
158469
158567
|
getReducer: function getReducer() {
|
|
158470
158568
|
var initialData = {
|
|
@@ -158535,10 +158633,10 @@ var bundle$f = {
|
|
|
158535
158633
|
}
|
|
158536
158634
|
};
|
|
158537
158635
|
|
|
158538
|
-
var plugin$
|
|
158636
|
+
var plugin$l = {
|
|
158539
158637
|
pluginName: "ZoomToInitial",
|
|
158540
158638
|
enabled: true,
|
|
158541
|
-
bundle: bundle$
|
|
158639
|
+
bundle: bundle$g,
|
|
158542
158640
|
components: [{
|
|
158543
158641
|
component: ZoomHomeButton$1,
|
|
158544
158642
|
region: "left-sidebar-top",
|
|
@@ -158610,7 +158708,7 @@ var ZoomToBoxButton$1 = connect('doStartZoomBox', 'doStopZoomBox', ZoomToBoxButt
|
|
|
158610
158708
|
var zoombox = createInteraction({
|
|
158611
158709
|
interaction: 'dragbox'
|
|
158612
158710
|
});
|
|
158613
|
-
var bundle$
|
|
158711
|
+
var bundle$h = {
|
|
158614
158712
|
name: 'zoombox',
|
|
158615
158713
|
getReducer: function getReducer() {
|
|
158616
158714
|
var initialData = {
|
|
@@ -158708,10 +158806,10 @@ var bundle$g = {
|
|
|
158708
158806
|
}
|
|
158709
158807
|
};
|
|
158710
158808
|
|
|
158711
|
-
var plugin$
|
|
158809
|
+
var plugin$m = {
|
|
158712
158810
|
pluginName: 'ZoomtoExtent',
|
|
158713
158811
|
enabled: true,
|
|
158714
|
-
bundle: bundle$
|
|
158812
|
+
bundle: bundle$h,
|
|
158715
158813
|
components: [{
|
|
158716
158814
|
component: ZoomToBoxButton$1,
|
|
158717
158815
|
region: 'basic-toolbar',
|
|
@@ -158763,7 +158861,7 @@ var MapLoadingIndicator = /*#__PURE__*/function (_React$Component) {
|
|
|
158763
158861
|
|
|
158764
158862
|
var MapLoadingIndicator$1 = connect("selectMapLoading", MapLoadingIndicator);
|
|
158765
158863
|
|
|
158766
|
-
var bundle$
|
|
158864
|
+
var bundle$i = {
|
|
158767
158865
|
name: "mapLoading",
|
|
158768
158866
|
getReducer: function getReducer() {
|
|
158769
158867
|
var initialData = {
|
|
@@ -158800,10 +158898,10 @@ var bundle$h = {
|
|
|
158800
158898
|
}
|
|
158801
158899
|
};
|
|
158802
158900
|
|
|
158803
|
-
var plugin$
|
|
158901
|
+
var plugin$n = {
|
|
158804
158902
|
pluginName: "MapLoadingIndicator",
|
|
158805
158903
|
enabled: true,
|
|
158806
|
-
bundle: bundle$
|
|
158904
|
+
bundle: bundle$i,
|
|
158807
158905
|
components: [{
|
|
158808
158906
|
component: MapLoadingIndicator$1,
|
|
158809
158907
|
region: "lower-right-toolbar",
|
|
@@ -158839,7 +158937,7 @@ exports.geocoder = plugin$6;
|
|
|
158839
158937
|
exports.geojsonIdent = plugin$7;
|
|
158840
158938
|
exports.identify = plugin$8;
|
|
158841
158939
|
exports.legend = plugin$9;
|
|
158842
|
-
exports.mapLoadingIndicator = plugin$
|
|
158940
|
+
exports.mapLoadingIndicator = plugin$n;
|
|
158843
158941
|
exports.measureTools = plugin$a;
|
|
158844
158942
|
exports.permalink = plugin$b;
|
|
158845
158943
|
exports.printMap = plugin$c;
|
|
@@ -158850,6 +158948,7 @@ exports.treeView = plugin$g;
|
|
|
158850
158948
|
exports.treeViewPanel = TreeviewPanel$1;
|
|
158851
158949
|
exports.vectorIdent = plugin$h;
|
|
158852
158950
|
exports.vectorSearch = plugin$i;
|
|
158853
|
-
exports.zoomHome = plugin$
|
|
158951
|
+
exports.zoomHome = plugin$l;
|
|
158854
158952
|
exports.zoomInOut = plugin$j;
|
|
158855
|
-
exports.
|
|
158953
|
+
exports.zoomLevel = plugin$k;
|
|
158954
|
+
exports.zoomToBox = plugin$m;
|
package/lib/prod.js
CHANGED
|
@@ -103647,7 +103647,8 @@ var mapViewBundle = {
|
|
|
103647
103647
|
maxZoom: 22,
|
|
103648
103648
|
action: null,
|
|
103649
103649
|
updating: false,
|
|
103650
|
-
listening: false
|
|
103650
|
+
listening: false,
|
|
103651
|
+
shouldUpdateZoom: false
|
|
103651
103652
|
};
|
|
103652
103653
|
return function () {
|
|
103653
103654
|
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialData;
|
|
@@ -103813,9 +103814,12 @@ var mapViewBundle = {
|
|
|
103813
103814
|
dispatch({
|
|
103814
103815
|
type: "VIEW_START_ACTION"
|
|
103815
103816
|
});
|
|
103816
|
-
var view = store.selectView();
|
|
103817
|
-
|
|
103818
|
-
|
|
103817
|
+
var view = store.selectView(); // pulling view
|
|
103818
|
+
|
|
103819
|
+
var currentZoom = view.getZoom(); // getting current view
|
|
103820
|
+
|
|
103821
|
+
animateView( // subtract 1 from current zoom
|
|
103822
|
+
{
|
|
103819
103823
|
zoom: currentZoom - 1
|
|
103820
103824
|
}, view);
|
|
103821
103825
|
dispatch({
|
|
@@ -105245,7 +105249,7 @@ var config = {
|
|
|
105245
105249
|
};
|
|
105246
105250
|
|
|
105247
105251
|
var name = "@corpsmap/corpsmap";
|
|
105248
|
-
var version$1 = "3.0.
|
|
105252
|
+
var version$1 = "3.0.9";
|
|
105249
105253
|
var description = "CorpsMap as React Components";
|
|
105250
105254
|
var main = "index.js";
|
|
105251
105255
|
var scripts = {
|
|
@@ -158311,6 +158315,100 @@ var plugin$j = {
|
|
|
158311
158315
|
}]
|
|
158312
158316
|
};
|
|
158313
158317
|
|
|
158318
|
+
var zoomIndicator = /*#__PURE__*/function (_React$Component) {
|
|
158319
|
+
_inherits(zoomIndicator, _React$Component);
|
|
158320
|
+
|
|
158321
|
+
var _super = _createSuper(zoomIndicator);
|
|
158322
|
+
|
|
158323
|
+
function zoomIndicator(props) {
|
|
158324
|
+
var _this;
|
|
158325
|
+
|
|
158326
|
+
_classCallCheck(this, zoomIndicator);
|
|
158327
|
+
|
|
158328
|
+
_this = _super.call(this, props);
|
|
158329
|
+
_this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
|
|
158330
|
+
return _this;
|
|
158331
|
+
}
|
|
158332
|
+
|
|
158333
|
+
_createClass(zoomIndicator, [{
|
|
158334
|
+
key: "handleClick",
|
|
158335
|
+
value: function handleClick() {}
|
|
158336
|
+
}, {
|
|
158337
|
+
key: "render",
|
|
158338
|
+
value: function render() {
|
|
158339
|
+
var _this$props = this.props,
|
|
158340
|
+
mapZoom = _this$props.mapZoom,
|
|
158341
|
+
zoomLevelIndicator = _this$props.zoomLevelIndicator;
|
|
158342
|
+
|
|
158343
|
+
if (zoomLevelIndicator == true) {
|
|
158344
|
+
return /*#__PURE__*/React$1__default.createElement(SidebarButton$1, {
|
|
158345
|
+
iconText: Math.floor(mapZoom),
|
|
158346
|
+
label: "Zoom-Indicator",
|
|
158347
|
+
title: "Zoom-Indicator",
|
|
158348
|
+
onClick: this.handleClick
|
|
158349
|
+
});
|
|
158350
|
+
} else {
|
|
158351
|
+
return null;
|
|
158352
|
+
}
|
|
158353
|
+
}
|
|
158354
|
+
}]);
|
|
158355
|
+
|
|
158356
|
+
return zoomIndicator;
|
|
158357
|
+
}(React$1__default.Component);
|
|
158358
|
+
|
|
158359
|
+
var zoomIndicator$1 = connect('doZoomIndicatorActivate', 'selectMapZoom', 'selectZoomLevelIndicator', zoomIndicator);
|
|
158360
|
+
|
|
158361
|
+
var bundle$f = {
|
|
158362
|
+
name: "zoomLevel",
|
|
158363
|
+
getReducer: function getReducer() {
|
|
158364
|
+
var initialData = {
|
|
158365
|
+
zoomLevelIndicator: false
|
|
158366
|
+
};
|
|
158367
|
+
return function () {
|
|
158368
|
+
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialData;
|
|
158369
|
+
|
|
158370
|
+
var _ref = arguments.length > 1 ? arguments[1] : undefined,
|
|
158371
|
+
type = _ref.type,
|
|
158372
|
+
payload = _ref.payload;
|
|
158373
|
+
|
|
158374
|
+
switch (type) {
|
|
158375
|
+
case "ACTIVATE_ZOOM_INDICATOR":
|
|
158376
|
+
case "DEACTIVATE_ZOOM_INDICATOR":
|
|
158377
|
+
return Object.assign({}, state, payload);
|
|
158378
|
+
|
|
158379
|
+
default:
|
|
158380
|
+
return state;
|
|
158381
|
+
}
|
|
158382
|
+
};
|
|
158383
|
+
},
|
|
158384
|
+
doZoomIndicatorActivate: function doZoomIndicatorActivate() {
|
|
158385
|
+
return function (_ref2) {
|
|
158386
|
+
var dispatch = _ref2.dispatch,
|
|
158387
|
+
store = _ref2.store;
|
|
158388
|
+
dispatch({
|
|
158389
|
+
type: "ACTIVATE_ZOOM_INDICATOR",
|
|
158390
|
+
payload: {
|
|
158391
|
+
zoomLevelIndicator: true
|
|
158392
|
+
}
|
|
158393
|
+
});
|
|
158394
|
+
};
|
|
158395
|
+
},
|
|
158396
|
+
selectZoomLevelIndicator: function selectZoomLevelIndicator(state) {
|
|
158397
|
+
return state.zoomLevel.zoomLevelIndicator;
|
|
158398
|
+
}
|
|
158399
|
+
};
|
|
158400
|
+
|
|
158401
|
+
var plugin$k = {
|
|
158402
|
+
pluginName: 'zoomIndicator',
|
|
158403
|
+
enabled: true,
|
|
158404
|
+
bundle: bundle$f,
|
|
158405
|
+
components: [{
|
|
158406
|
+
component: zoomIndicator$1,
|
|
158407
|
+
region: 'right-sidebar-top',
|
|
158408
|
+
sortOrder: 40
|
|
158409
|
+
}]
|
|
158410
|
+
};
|
|
158411
|
+
|
|
158314
158412
|
var ZoomHomeButton = /*#__PURE__*/function (_React$Component) {
|
|
158315
158413
|
_inherits(ZoomHomeButton, _React$Component);
|
|
158316
158414
|
|
|
@@ -158378,7 +158476,7 @@ var ZoomHomeButton = /*#__PURE__*/function (_React$Component) {
|
|
|
158378
158476
|
|
|
158379
158477
|
var ZoomHomeButton$1 = connect("doZoomHome", "doZoomHomeResetLoc", "doNotificationsFire", ZoomHomeButton);
|
|
158380
158478
|
|
|
158381
|
-
var bundle$
|
|
158479
|
+
var bundle$g = {
|
|
158382
158480
|
name: "zoomHome",
|
|
158383
158481
|
getReducer: function getReducer() {
|
|
158384
158482
|
var initialData = {
|
|
@@ -158449,10 +158547,10 @@ var bundle$f = {
|
|
|
158449
158547
|
}
|
|
158450
158548
|
};
|
|
158451
158549
|
|
|
158452
|
-
var plugin$
|
|
158550
|
+
var plugin$l = {
|
|
158453
158551
|
pluginName: "ZoomToInitial",
|
|
158454
158552
|
enabled: true,
|
|
158455
|
-
bundle: bundle$
|
|
158553
|
+
bundle: bundle$g,
|
|
158456
158554
|
components: [{
|
|
158457
158555
|
component: ZoomHomeButton$1,
|
|
158458
158556
|
region: "left-sidebar-top",
|
|
@@ -158524,7 +158622,7 @@ var ZoomToBoxButton$1 = connect('doStartZoomBox', 'doStopZoomBox', ZoomToBoxButt
|
|
|
158524
158622
|
var zoombox = createInteraction({
|
|
158525
158623
|
interaction: 'dragbox'
|
|
158526
158624
|
});
|
|
158527
|
-
var bundle$
|
|
158625
|
+
var bundle$h = {
|
|
158528
158626
|
name: 'zoombox',
|
|
158529
158627
|
getReducer: function getReducer() {
|
|
158530
158628
|
var initialData = {
|
|
@@ -158622,10 +158720,10 @@ var bundle$g = {
|
|
|
158622
158720
|
}
|
|
158623
158721
|
};
|
|
158624
158722
|
|
|
158625
|
-
var plugin$
|
|
158723
|
+
var plugin$m = {
|
|
158626
158724
|
pluginName: 'ZoomtoExtent',
|
|
158627
158725
|
enabled: true,
|
|
158628
|
-
bundle: bundle$
|
|
158726
|
+
bundle: bundle$h,
|
|
158629
158727
|
components: [{
|
|
158630
158728
|
component: ZoomToBoxButton$1,
|
|
158631
158729
|
region: 'basic-toolbar',
|
|
@@ -158677,7 +158775,7 @@ var MapLoadingIndicator = /*#__PURE__*/function (_React$Component) {
|
|
|
158677
158775
|
|
|
158678
158776
|
var MapLoadingIndicator$1 = connect("selectMapLoading", MapLoadingIndicator);
|
|
158679
158777
|
|
|
158680
|
-
var bundle$
|
|
158778
|
+
var bundle$i = {
|
|
158681
158779
|
name: "mapLoading",
|
|
158682
158780
|
getReducer: function getReducer() {
|
|
158683
158781
|
var initialData = {
|
|
@@ -158714,10 +158812,10 @@ var bundle$h = {
|
|
|
158714
158812
|
}
|
|
158715
158813
|
};
|
|
158716
158814
|
|
|
158717
|
-
var plugin$
|
|
158815
|
+
var plugin$n = {
|
|
158718
158816
|
pluginName: "MapLoadingIndicator",
|
|
158719
158817
|
enabled: true,
|
|
158720
|
-
bundle: bundle$
|
|
158818
|
+
bundle: bundle$i,
|
|
158721
158819
|
components: [{
|
|
158722
158820
|
component: MapLoadingIndicator$1,
|
|
158723
158821
|
region: "lower-right-toolbar",
|
|
@@ -158753,7 +158851,7 @@ exports.geocoder = plugin$6;
|
|
|
158753
158851
|
exports.geojsonIdent = plugin$7;
|
|
158754
158852
|
exports.identify = plugin$8;
|
|
158755
158853
|
exports.legend = plugin$9;
|
|
158756
|
-
exports.mapLoadingIndicator = plugin$
|
|
158854
|
+
exports.mapLoadingIndicator = plugin$n;
|
|
158757
158855
|
exports.measureTools = plugin$a;
|
|
158758
158856
|
exports.permalink = plugin$b;
|
|
158759
158857
|
exports.printMap = plugin$c;
|
|
@@ -158764,6 +158862,7 @@ exports.treeView = plugin$g;
|
|
|
158764
158862
|
exports.treeViewPanel = TreeviewPanel$1;
|
|
158765
158863
|
exports.vectorIdent = plugin$h;
|
|
158766
158864
|
exports.vectorSearch = plugin$i;
|
|
158767
|
-
exports.zoomHome = plugin$
|
|
158865
|
+
exports.zoomHome = plugin$l;
|
|
158768
158866
|
exports.zoomInOut = plugin$j;
|
|
158769
|
-
exports.
|
|
158867
|
+
exports.zoomLevel = plugin$k;
|
|
158868
|
+
exports.zoomToBox = plugin$m;
|
package/package.json
CHANGED
|
@@ -35,6 +35,7 @@ export default {
|
|
|
35
35
|
action: null,
|
|
36
36
|
updating: false,
|
|
37
37
|
listening: false,
|
|
38
|
+
shouldUpdateZoom: false,
|
|
38
39
|
};
|
|
39
40
|
|
|
40
41
|
return (state = initialData, { type, payload }) => {
|
|
@@ -97,6 +98,7 @@ export default {
|
|
|
97
98
|
roll: 0,
|
|
98
99
|
minZoom: d.minzoom ? d.minzoom : 0,
|
|
99
100
|
maxZoom: d.maxzoom ? d.maxzoom : 22,
|
|
101
|
+
|
|
100
102
|
};
|
|
101
103
|
|
|
102
104
|
dispatch({ type: "VIEW_SET_DEFAULTS", payload: config });
|
|
@@ -161,9 +163,9 @@ export default {
|
|
|
161
163
|
|
|
162
164
|
doZoomOut: () => ({ dispatch, store }) => {
|
|
163
165
|
dispatch({ type: "VIEW_START_ACTION" });
|
|
164
|
-
const view = store.selectView();
|
|
165
|
-
const currentZoom = view.getZoom();
|
|
166
|
-
animateView(
|
|
166
|
+
const view = store.selectView(); // pulling view
|
|
167
|
+
const currentZoom = view.getZoom(); // getting current view
|
|
168
|
+
animateView( // subtract 1 from current zoom
|
|
167
169
|
{
|
|
168
170
|
zoom: currentZoom - 1,
|
|
169
171
|
},
|
|
@@ -53,7 +53,10 @@ const LayerSubpanel = (props) => {
|
|
|
53
53
|
<i className="mdi mdi-star" title="Layer saved to favorites list" />
|
|
54
54
|
) : null}
|
|
55
55
|
{treeViewSelectedItem.userDefaultLayer ? (
|
|
56
|
-
<i
|
|
56
|
+
<i
|
|
57
|
+
className="mdi mdi-account"
|
|
58
|
+
title="Layer saved to user default layer list"
|
|
59
|
+
/>
|
|
57
60
|
) : null}
|
|
58
61
|
<b>{treeViewSelectedItem.displayName}</b>
|
|
59
62
|
</p>
|
|
@@ -95,7 +98,7 @@ const LayerSubpanel = (props) => {
|
|
|
95
98
|
<DefaultsToggle layer={treeViewSelectedItem} />
|
|
96
99
|
) : null}
|
|
97
100
|
|
|
98
|
-
{showDownload ?
|
|
101
|
+
{showDownload ? <DownloadLayer /> : null}
|
|
99
102
|
|
|
100
103
|
<OpacitySlider layer={treeViewSelectedItem.mapLayer} />
|
|
101
104
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
name: "zoomLevel",
|
|
3
|
+
|
|
4
|
+
getReducer: () => {
|
|
5
|
+
const initialData = {
|
|
6
|
+
zoomLevelIndicator: false,
|
|
7
|
+
};
|
|
8
|
+
return (state = initialData, { type, payload }) => {
|
|
9
|
+
switch (type) {
|
|
10
|
+
case "ACTIVATE_ZOOM_INDICATOR":
|
|
11
|
+
case "DEACTIVATE_ZOOM_INDICATOR":
|
|
12
|
+
return Object.assign({}, state, payload);
|
|
13
|
+
default:
|
|
14
|
+
return state;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
doZoomIndicatorActivate: () => ({ dispatch, store }) => {
|
|
20
|
+
dispatch({
|
|
21
|
+
type: "ACTIVATE_ZOOM_INDICATOR",
|
|
22
|
+
payload: {
|
|
23
|
+
zoomLevelIndicator: true,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
selectZoomLevelIndicator: (state) => {
|
|
29
|
+
return state.zoomLevel.zoomLevelIndicator;
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import zoomIndicator from './zoom-indicator';
|
|
2
|
+
import bundle from "./bundle";
|
|
3
|
+
|
|
4
|
+
const plugin = {
|
|
5
|
+
pluginName: 'zoomIndicator',
|
|
6
|
+
enabled: true,
|
|
7
|
+
bundle: bundle,
|
|
8
|
+
components:[{
|
|
9
|
+
component: zoomIndicator,
|
|
10
|
+
region: 'right-sidebar-top',
|
|
11
|
+
sortOrder: 40
|
|
12
|
+
|
|
13
|
+
}]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default plugin;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "redux-bundler-react";
|
|
3
|
+
import { SidebarButton } from "../../application-controls/index";
|
|
4
|
+
|
|
5
|
+
class zoomIndicator extends React.Component {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
super(props);
|
|
8
|
+
this.handleClick = this.handleClick.bind(this);
|
|
9
|
+
}
|
|
10
|
+
handleClick() {}
|
|
11
|
+
render() {
|
|
12
|
+
const {mapZoom, zoomLevelIndicator} = this.props;
|
|
13
|
+
|
|
14
|
+
if (zoomLevelIndicator == true){
|
|
15
|
+
return (
|
|
16
|
+
<SidebarButton
|
|
17
|
+
iconText={Math.floor(mapZoom)}
|
|
18
|
+
label="Zoom-Indicator"
|
|
19
|
+
title="Zoom-Indicator"
|
|
20
|
+
onClick={this.handleClick}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
else{
|
|
25
|
+
return (null);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default connect(
|
|
31
|
+
'doZoomIndicatorActivate',
|
|
32
|
+
'selectMapZoom',
|
|
33
|
+
'selectZoomLevelIndicator',
|
|
34
|
+
zoomIndicator
|
|
35
|
+
);
|
package/src/index.js
CHANGED
|
@@ -26,6 +26,7 @@ import basemapSwitcher from "./core-plugins/basemap-switcher";
|
|
|
26
26
|
import bookmarks from "./core-plugins/bookmarks";
|
|
27
27
|
// import catalog from './core-plugins/catalog';
|
|
28
28
|
// import cmIdent from './core-plugins/identify-cm';
|
|
29
|
+
|
|
29
30
|
import coordDisplay from "./core-plugins/coordinate-display";
|
|
30
31
|
import draw from "./core-plugins/draw-tools";
|
|
31
32
|
// import editor from './core-plugins/editor';
|
|
@@ -46,6 +47,7 @@ import treeViewPanel from "./core-plugins/tree-view/tree-view-panel";
|
|
|
46
47
|
import vectorIdent from "./core-plugins/identify-vector";
|
|
47
48
|
import vectorSearch from "./core-plugins/vector-search";
|
|
48
49
|
import zoomInOut from "./core-plugins/zoom-in-out";
|
|
50
|
+
import zoomLevel from "./core-plugins/zoom-level";
|
|
49
51
|
import zoomHome from "./core-plugins/zoom-home";
|
|
50
52
|
import zoomToBox from "./core-plugins/zoom-to-box";
|
|
51
53
|
import mapLoadingIndicator from "./core-plugins/map-loading-indicator";
|
|
@@ -74,6 +76,7 @@ export {
|
|
|
74
76
|
bookmarks,
|
|
75
77
|
// catalog,
|
|
76
78
|
// cmIdent,
|
|
79
|
+
zoomLevel,
|
|
77
80
|
coordDisplay,
|
|
78
81
|
draw,
|
|
79
82
|
// editor,
|