From d7d1d8123da49ea7f1c44d73c0f6d29a929d4de4 Mon Sep 17 00:00:00 2001 From: Ilya Zverev Date: Sat, 28 Dec 2013 13:25:24 +0400 Subject: [PATCH 1/4] 1.2.1-dev, bring editor window to foreground --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- src/MapBBCodeUI.Editor.js | 4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5b4b54..dd40dc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ Versions are numbered "major.minor.patch", with the `master` branch being "major All changes without author are by [Ilya Zverev](https://github.com/Zverik). +## 1.2.1-dev (master) + +### Improvements + +* Editor window is always reopened on subsequent `editorWindow` calls, bringing it to the foreground. + +### Bugfixes + ## 1.2.0 (2013-12-25) ### Notable Changes diff --git a/package.json b/package.json index 7e1eebd..2dfc663 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapbbcode", - "version": "1.2.0", + "version": "1.2.1-dev", "description": "JavaScript library for [map] BBCode parsing, displaying and editing", "devDependencies": { "leaflet": "git://github.com/Leaflet/Leaflet.git", diff --git a/src/MapBBCodeUI.Editor.js b/src/MapBBCodeUI.Editor.js index 07c9f2e..af9dcbd 100644 --- a/src/MapBBCodeUI.Editor.js +++ b/src/MapBBCodeUI.Editor.js @@ -340,6 +340,8 @@ window.MapBBCode.include({ windowPath = this.options.windowPath, url = windowPath.substring(windowPath.length - 1) == '/' ? windowPath + 'mapbbcode-window.html' : windowPath; - window.open(url, 'mapbbcode_editor', features + ',' + featSize); + if( this._edWnd && !this._edWnd.closed ) + this._edWnd.close(); + this._edWnd = window.open(url, 'mapbbcode_editor', features + ',' + featSize); } }); From a38976a7cce81c76a5a01b8f2870e16c67dffe72 Mon Sep 17 00:00:00 2001 From: Ilya Zverev Date: Mon, 9 Nov 2015 14:46:41 +0300 Subject: [PATCH 2/4] Update MapSurfer tiles link --- src/layers/LayerList.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/layers/LayerList.js b/src/layers/LayerList.js index 022c6a8..8669787 100644 --- a/src/layers/LayerList.js +++ b/src/layers/LayerList.js @@ -11,9 +11,9 @@ window.layerList = { "OpenStreetMap FR": "L.tileLayer('http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', { subdomains: 'abc', attribution: 'Map © OpenStreetMap | Tiles © OSM France', minZoom: 0, maxZoom: 20 })", "Hike & Bike": "L.layerGroup([ L.tileLayer('http://toolserver.org/tiles/hikebike/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Colin Marquardt' } ), L.tileLayer('http://toolserver.org/~cmarqu/hill/{z}/{x}/{y}.png', { minZoom: 0, maxZoom: 17 }) ])", "CycleMap": "L.tileLayer('http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Andy Allan', minZoom: 0, maxZoom: 18 })", - "OpenMapSurfer": "L.tileLayer('http://openmapsurfer.uni-hd.de/tiles/roads/x={x}&y={y}&z={z}', { attribution: 'Map © OSM | Tiles © GIScience Heidelberg', minZoom: 0, maxZoom: 19 })", - "OpenMapSurfer Contour": "L.layerGroup([ L.tileLayer('http://openmapsurfer.uni-hd.de/tiles/roads/x={x}&y={y}&z={z}', { attribution: 'Map © OSM | Tiles © GIScience Heidelberg', minZoom: 0, maxZoom: 19 }), L.tileLayer('http://openmapsurfer.uni-hd.de/tiles/asterc/x={x}&y={y}&z={z}') ])", - "OpenMapSurfer Grayscale": "L.tileLayer('http://openmapsurfer.uni-hd.de/tiles/roadsg/x={x}&y={y}&z={z}', { attribution: 'Map © OSM | Tiles © GIScience Heidelberg', minZoom: 0, maxZoom: 19 })", + "OpenMapSurfer": "L.tileLayer('http://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}', { attribution: 'Map © OSM | Tiles © GIScience Heidelberg', minZoom: 0, maxZoom: 19 })", + "OpenMapSurfer Contour": "L.layerGroup([ L.tileLayer('http://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}', { attribution: 'Map © OSM | Tiles © GIScience Heidelberg', minZoom: 0, maxZoom: 19 }), L.tileLayer('http://openmapsurfer.uni-hd.de/tiles/asterc/x={x}&y={y}&z={z}') ])", + "OpenMapSurfer Grayscale": "L.tileLayer('http://korona.geog.uni-heidelberg.de/tiles/roadsg/x={x}&y={y}&z={z}', { attribution: 'Map © OSM | Tiles © GIScience Heidelberg', minZoom: 0, maxZoom: 19 })", "Humanitarian": "L.tileLayer('http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', { attribution: 'Map © OpenStreetMap | Tiles © Humanitarian OSM Team', minZoom: 0, maxZoom: 19 })", "Transport": "L.tileLayer('http://{s}.tile2.opencyclemap.org/transport/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Andy Allan', minZoom: 0, maxZoom: 18 })", "Landscape": "L.tileLayer('http://{s}.tile3.opencyclemap.org/landscape/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Andy Allan', minZoom: 0, maxZoom: 18 })", From 3d5bc5b3b644744c52e91d162f6510b729890b64 Mon Sep 17 00:00:00 2001 From: Ilya Zverev Date: Mon, 3 Oct 2016 11:27:18 +0300 Subject: [PATCH 3/4] Remove obsolete layers --- src/layers/LayerList.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/layers/LayerList.js b/src/layers/LayerList.js index 8669787..ee4ad6e 100644 --- a/src/layers/LayerList.js +++ b/src/layers/LayerList.js @@ -18,11 +18,9 @@ window.layerList = { "Transport": "L.tileLayer('http://{s}.tile2.opencyclemap.org/transport/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Andy Allan', minZoom: 0, maxZoom: 18 })", "Landscape": "L.tileLayer('http://{s}.tile3.opencyclemap.org/landscape/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Andy Allan', minZoom: 0, maxZoom: 18 })", "Outdoors": "L.tileLayer('http://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Andy Allan', minZoom: 0, maxZoom: 18 })", - "MapQuest Open": "L.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg', { attribution: 'Map © OSM | Tiles © MapQuest', subdomains: '1234', minZoom: 0, maxZoom: 18 })", "Stamen Toner": "L.tileLayer('http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Stamen Design', minZoom: 0, maxZoom: 20 })", "Stamen Toner Lite": "L.tileLayer('http://{s}.tile.stamen.com/toner-lite/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Stamen Design', minZoom: 0, maxZoom: 20 })", "Stamen Watercolor": "L.tileLayer('http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Stamen Design', minZoom: 3, maxZoom: 16 })", - "Cloudmade": "L.tileLayer('http://{s}.tile.cloudmade.com/{apiKey}/{styleID}/256/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © CloudMade', apiKey: '{key:http://account.cloudmade.com/register}', styleID: '1', minZoom: 0, maxZoom: 18 })", "MapBox": "L.tileLayer('http://{s}.tiles.mapbox.com/v3/{key:https://www.mapbox.com/#signup}/{z}/{x}/{y}.png', { subdomains: 'abcd', attribution: 'Map © OpenStreetMap' })" }, From b04d14bfbbf381e446f1b0fb7bdce3b81b01424a Mon Sep 17 00:00:00 2001 From: Johannes Visintini Date: Mon, 9 Aug 2021 13:57:42 +0200 Subject: [PATCH 4/4] Remove OpenMapSurfer --- src/layers/LayerList.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/layers/LayerList.js b/src/layers/LayerList.js index ee4ad6e..eaa74e5 100644 --- a/src/layers/LayerList.js +++ b/src/layers/LayerList.js @@ -11,9 +11,6 @@ window.layerList = { "OpenStreetMap FR": "L.tileLayer('http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', { subdomains: 'abc', attribution: 'Map © OpenStreetMap | Tiles © OSM France', minZoom: 0, maxZoom: 20 })", "Hike & Bike": "L.layerGroup([ L.tileLayer('http://toolserver.org/tiles/hikebike/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Colin Marquardt' } ), L.tileLayer('http://toolserver.org/~cmarqu/hill/{z}/{x}/{y}.png', { minZoom: 0, maxZoom: 17 }) ])", "CycleMap": "L.tileLayer('http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Andy Allan', minZoom: 0, maxZoom: 18 })", - "OpenMapSurfer": "L.tileLayer('http://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}', { attribution: 'Map © OSM | Tiles © GIScience Heidelberg', minZoom: 0, maxZoom: 19 })", - "OpenMapSurfer Contour": "L.layerGroup([ L.tileLayer('http://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}', { attribution: 'Map © OSM | Tiles © GIScience Heidelberg', minZoom: 0, maxZoom: 19 }), L.tileLayer('http://openmapsurfer.uni-hd.de/tiles/asterc/x={x}&y={y}&z={z}') ])", - "OpenMapSurfer Grayscale": "L.tileLayer('http://korona.geog.uni-heidelberg.de/tiles/roadsg/x={x}&y={y}&z={z}', { attribution: 'Map © OSM | Tiles © GIScience Heidelberg', minZoom: 0, maxZoom: 19 })", "Humanitarian": "L.tileLayer('http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', { attribution: 'Map © OpenStreetMap | Tiles © Humanitarian OSM Team', minZoom: 0, maxZoom: 19 })", "Transport": "L.tileLayer('http://{s}.tile2.opencyclemap.org/transport/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Andy Allan', minZoom: 0, maxZoom: 18 })", "Landscape": "L.tileLayer('http://{s}.tile3.opencyclemap.org/landscape/{z}/{x}/{y}.png', { attribution: 'Map © OSM | Tiles © Andy Allan', minZoom: 0, maxZoom: 18 })",