mirror of
https://github.com/maputnik/editor.git
synced 2026-05-04 07:10:01 +00:00
Compare commits
8 Commits
v1.1.0-bet
...
v1.1.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e4c06cc3e | ||
|
|
7e510a2582 | ||
|
|
f3cb9c4fdd | ||
|
|
f0f6130272 | ||
|
|
0ebb299fd0 | ||
|
|
9d96525f12 | ||
|
|
fc6f9251f7 | ||
|
|
53cb317155 |
@@ -4,6 +4,17 @@ module.exports = [
|
|||||||
exclude: /(node_modules|bower_components|public)/,
|
exclude: /(node_modules|bower_components|public)/,
|
||||||
loaders: ['react-hot-loader/webpack']
|
loaders: ['react-hot-loader/webpack']
|
||||||
},
|
},
|
||||||
|
// HACK: This is a massive hack and reaches into the mapbox-gl private API.
|
||||||
|
// We have to include this for access to `normalizeSourceURL`. We should
|
||||||
|
// remove this ASAP, see <https://github.com/mapbox/mapbox-gl-js/issues/2416>
|
||||||
|
{
|
||||||
|
test: /.*node_modules[\/\\]mapbox-gl[\/\\]src[\/\\]util[\/\\].*\.js/,
|
||||||
|
loader: 'babel-loader',
|
||||||
|
query: {
|
||||||
|
presets: ['env', 'react', 'flow'],
|
||||||
|
plugins: ['transform-runtime', 'transform-decorators-legacy', 'transform-class-properties'],
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
test: /\.jsx?$/,
|
test: /\.jsx?$/,
|
||||||
exclude: /(.*node_modules(?![\/\\]@mapbox[\/\\]mapbox-gl-style-spec)|bower_components|public)/,
|
exclude: /(.*node_modules(?![\/\\]@mapbox[\/\\]mapbox-gl-style-spec)|bower_components|public)/,
|
||||||
|
|||||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "maputnik",
|
"name": "maputnik",
|
||||||
"version": "1.1.0-beta3",
|
"version": "1.1.0-beta4",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "maputnik",
|
"name": "maputnik",
|
||||||
"version": "1.1.0-beta3",
|
"version": "1.1.0-beta4",
|
||||||
"description": "A MapboxGL visual style editor",
|
"description": "A MapboxGL visual style editor",
|
||||||
"main": "''",
|
"main": "''",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -96,6 +96,7 @@
|
|||||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||||
"babel-plugin-transform-runtime": "^6.23.0",
|
"babel-plugin-transform-runtime": "^6.23.0",
|
||||||
"babel-preset-env": "^1.6.1",
|
"babel-preset-env": "^1.6.1",
|
||||||
|
"babel-preset-flow": "^6.23.0",
|
||||||
"babel-preset-react": "^6.24.1",
|
"babel-preset-react": "^6.24.1",
|
||||||
"babel-runtime": "^6.26.0",
|
"babel-runtime": "^6.26.0",
|
||||||
"base64-loader": "^1.0.0",
|
"base64-loader": "^1.0.0",
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ import LayerWatcher from '../libs/layerwatcher'
|
|||||||
import tokens from '../config/tokens.json'
|
import tokens from '../config/tokens.json'
|
||||||
import isEqual from 'lodash.isequal'
|
import isEqual from 'lodash.isequal'
|
||||||
|
|
||||||
|
import MapboxGl from 'mapbox-gl'
|
||||||
|
import mapboxUtil from 'mapbox-gl/src/util/mapbox'
|
||||||
|
|
||||||
|
|
||||||
function updateRootSpec(spec, fieldName, newValues) {
|
function updateRootSpec(spec, fieldName, newValues) {
|
||||||
return {
|
return {
|
||||||
...spec,
|
...spec,
|
||||||
@@ -199,7 +203,13 @@ export default class App extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if(!this.state.sources.hasOwnProperty(key) && val.type === "vector") {
|
if(!this.state.sources.hasOwnProperty(key) && val.type === "vector") {
|
||||||
const url = val.url;
|
let url = val.url;
|
||||||
|
try {
|
||||||
|
url = mapboxUtil.normalizeSourceURL(url, MapboxGl.accessToken);
|
||||||
|
} catch(err) {
|
||||||
|
console.warn("Failed to normalizeSourceURL: ", err);
|
||||||
|
}
|
||||||
|
|
||||||
fetch(url)
|
fetch(url)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
return response.json();
|
return response.json();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
background-color: $color-black;
|
background-color: $color-black;
|
||||||
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.maputnik-modal-section {
|
.maputnik-modal-section {
|
||||||
|
|||||||
Reference in New Issue
Block a user