@boundlessgeo/storytools
Advanced tools
Comparing version 1.0.0-alpha1 to 1.0.0-alpha10
@@ -8,7 +8,7 @@ { | ||
], | ||
"description": "Collection of MapLoom extensions", | ||
"description": "time slider and timeline controls for maps", | ||
"homepage": "", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/boundlessgeo/story-tools.git" | ||
"url": "git://github.com/mapstory/time-controls.git" | ||
}, | ||
@@ -15,0 +15,0 @@ "ignore": [ |
@@ -93,3 +93,3 @@ //'use strict'; | ||
identifier: { | ||
value: "results" | ||
value: "result" | ||
}, | ||
@@ -96,0 +96,0 @@ mimeType: mimeType |
@@ -178,6 +178,6 @@ (function() { | ||
var name = $scope.styleTypes[i].name; | ||
$scope.styleTypes[i].active = false; | ||
if (name.indexOf(matchString) >= 0) { | ||
idx = i; | ||
$scope.styleTypes[i].active = false; | ||
} | ||
@@ -210,7 +210,7 @@ } | ||
// strip the hostname from style_href | ||
style_href = '/geoserver/' + style_href.split('/geoserver/')[1]; | ||
style_href = '/gs/' + style_href.split('/geoserver/')[1]; | ||
// this is an exchange assumption, and assumes SLD | ||
style_href = style_href.replace('.json', '.sld'); | ||
fetch(style_href).then(function(r) { | ||
fetch(style_href, {credentials: 'same-origin'}).then(function(r) { | ||
r.text().then(function(sldText) { | ||
@@ -331,2 +331,5 @@ var parser = new DOMParser(); | ||
$scope.styleTypes = stStyleTypes.getTypes(layer, $scope.layerstyles); | ||
for (var i = 0, ii = $scope.styleTypes.length; i < ii; i++) { | ||
$scope.styleTypes[i].active = false; | ||
} | ||
if ($scope.styleTypes.length > 0) { | ||
@@ -450,2 +453,26 @@ var activeStyleIndex = getStyleTypeIndex(); | ||
function changeStyle(delta) { | ||
var n_types = $scope.styleTypes.length; | ||
var idx = getStyleTypeIndex(); | ||
var new_idx = idx + delta; | ||
if (new_idx < 0) { | ||
new_idx = n_types - 1; | ||
} else if (new_idx >= n_types) { | ||
new_idx = 0; | ||
} | ||
for (var i = 0; i < n_types; i++) { | ||
$scope.styleTypes[i].active = (i === new_idx); | ||
} | ||
setActiveStyle($scope.styleTypes[new_idx]); | ||
} | ||
$scope.onPrev = function() { | ||
changeStyle(-1); | ||
}; | ||
$scope.onNext = function() { | ||
changeStyle(1); | ||
}; | ||
$scope.$watch('editorForm.$valid', function() { | ||
@@ -452,0 +479,0 @@ ($scope.formChanged || angular.noop)($scope.editorForm); |
@@ -32,3 +32,2 @@ (function() { | ||
scope.$parent.activeStyle[([property || scope.property])] = update; | ||
console.log((property || scope.property) + ' updated'); | ||
}; | ||
@@ -216,2 +215,18 @@ scope.styleChoices = scope.$parent.styleChoices; | ||
el[0].addEventListener('mousewheel', wheel, false ); // For others | ||
el[0].addEventListener('change', function(evt) { | ||
var input = el.find('input'); | ||
var min = Number(input.attr('min')) || 0; | ||
var max = Number(input.attr('max')); | ||
var val = scope.stModel[scope.property]; | ||
if (val < min) { | ||
scope.$apply(function() { | ||
scope.stModel[scope.property] = min; | ||
}); | ||
} else if (val > max) { | ||
scope.$apply(function() { | ||
scope.stModel[scope.property] = max; | ||
}); | ||
} | ||
}); | ||
}); | ||
@@ -316,2 +331,6 @@ editorDirective('colorEditor', 'color-editor.html'); | ||
}; | ||
scope.$watch('symbol.shape', function() { | ||
current(); | ||
}); | ||
} | ||
@@ -318,0 +337,0 @@ }; |
{ | ||
"name": "@boundlessgeo/storytools", | ||
"version": "1.0.0-alpha1", | ||
"description": "Collection of MapLoom extensions", | ||
"version": "1.0.0-alpha10", | ||
"description": "Additional maploom tools", | ||
"homepage": "", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/boundlessgeo/story-tools.git" | ||
"url": "git://github.com/boundlessgeo/storytools.git" | ||
}, | ||
@@ -16,3 +16,3 @@ "keywords": [ | ||
], | ||
"main": "./dist", | ||
"main": "./index", | ||
"scripts": { | ||
@@ -19,0 +19,0 @@ "test": "mocha", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15596994
136
187031
5
22
7