Skip to content

Commit

Permalink
Merge pull request #6 from sigcorporativo-ja/develop
Browse files Browse the repository at this point in the history
v1.0.1
  • Loading branch information
fbma authored Apr 29, 2021
2 parents eceb13a + f0eb555 commit 2c3e076
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 16 deletions.
7 changes: 4 additions & 3 deletions dist/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@
"name": "LyrCompare",
"description": "Comparación entre capas",
"text": "Plugin que permite comparar varias capas sobre una cartografía base. La extensión de las capas sobre lienzo vienen definidas por la posición del ratón o por el punto medio del lienzo.",
"version": "1.0.0",
"date": "Junio, 2020",
"version": "1.0.1",
"date": "Abril, 2021",
"author": "",
"org": "Consejería de Hacienda, Industria y Energía. Junta de Andalucía.",
"tags": "mapea,plugin",
"icon": "./facade/assets/icons/icons.svg"
"icon": "./facade/assets/icons/icons.svg",
"compatibility":["6"]
}
}
2 changes: 1 addition & 1 deletion dist/lyrcompare.ol.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lyrcompare.ol.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lyrcompare.ol.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lyrcompare",
"version": "1.0.0",
"version": "1.0.1",
"description": "",
"keywords": [
"map",
Expand Down
7 changes: 4 additions & 3 deletions src/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@
"name": "LyrCompare",
"description": "Comparación entre capas",
"text": "Plugin que permite comparar varias capas sobre una cartografía base. La extensión de las capas sobre lienzo vienen definidas por la posición del ratón o por el punto medio del lienzo.",
"version": "1.0.0",
"date": "Junio, 2020",
"version": "1.0.1",
"date": "Abril, 2021",
"author": "",
"org": "Consejería de Hacienda, Industria y Energía. Junta de Andalucía.",
"tags": "mapea,plugin",
"icon": "./facade/assets/icons/icons.svg"
"icon": "./facade/assets/icons/icons.svg",
"compatibility":["6"]
}
}
16 changes: 16 additions & 0 deletions src/impl/ol/js/CurtainInteraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,19 @@ export default class CurtainInteraction extends ol.interaction.Pointer {
this.layers_[0].postcompose = this.layers_[0].on('postcompose', this.postcomposeA_.bind(this));
this.layers_[1].precompose = this.layers_[1].on('precompose', this.precomposeB_.bind(this));
this.layers_[1].postcompose = this.layers_[1].on('postcompose', this.postcomposeB_.bind(this));
this.layers_[0].precompose = this.layers_[0].on('prerender', this.precomposeA_.bind(this));
this.layers_[0].postcompose = this.layers_[0].on('postrender', this.postcomposeA_.bind(this));
this.layers_[1].precompose = this.layers_[1].on('prerender', this.precomposeB_.bind(this));
this.layers_[1].postcompose = this.layers_[1].on('postrender', this.postcomposeB_.bind(this));
if (this.layers_[2] !== undefined && this.layers_[3] !== undefined) {
this.layers_[2].precompose = this.layers_[2].on('precompose', this.precomposeC_.bind(this));
this.layers_[2].postcompose = this.layers_[2].on('postcompose', this.postcomposeC_.bind(this));
this.layers_[3].precompose = this.layers_[3].on('precompose', this.precomposeD_.bind(this));
this.layers_[3].postcompose = this.layers_[3].on('postcompose', this.postcomposeD_.bind(this));
this.layers_[2].precompose = this.layers_[2].on('prerender', this.precomposeC_.bind(this));
this.layers_[2].postcompose = this.layers_[2].on('postrender', this.postcomposeC_.bind(this));
this.layers_[3].precompose = this.layers_[3].on('prerender', this.precomposeD_.bind(this));
this.layers_[3].postcompose = this.layers_[3].on('postrender', this.postcomposeD_.bind(this));
}
map.renderSync();
}
Expand Down Expand Up @@ -139,6 +147,8 @@ export default class CurtainInteraction extends ol.interaction.Pointer {
if (this.getMap()) {
l.precompose = layers[0].on('precompose', this.precomposeA_.bind(this));
l.postcompose = layers[0].on('postcompose', this.postcomposeA_.bind(this));
l.precompose = layers[0].on('prerender', this.precomposeA_.bind(this));
l.postcompose = layers[0].on('postrender', this.postcomposeA_.bind(this));
this.getMap().renderSync();
}
this.layers_.push(layers[0]);
Expand All @@ -157,6 +167,8 @@ export default class CurtainInteraction extends ol.interaction.Pointer {
if (this.getMap()) {
l.precompose = layers[0].on('precompose', this.precomposeB_.bind(this));
l.postcompose = layers[0].on('postcompose', this.postcomposeB_.bind(this));
l.precompose = layers[0].on('prerender', this.precomposeB_.bind(this));
l.postcompose = layers[0].on('postrender', this.postcomposeB_.bind(this));
this.getMap().renderSync();
}
this.layers_.push(layers[0]);
Expand All @@ -175,6 +187,8 @@ export default class CurtainInteraction extends ol.interaction.Pointer {
if (this.getMap()) {
l.precompose = layers[0].on('precompose', this.precomposeC_.bind(this));
l.postcompose = layers[0].on('postcompose', this.postcomposeC_.bind(this));
l.precompose = layers[0].on('prerender', this.precomposeC_.bind(this));
l.postcompose = layers[0].on('postrender', this.postcomposeC_.bind(this));
this.getMap().renderSync();
}
this.layers_.push(layers[0]);
Expand All @@ -193,6 +207,8 @@ export default class CurtainInteraction extends ol.interaction.Pointer {
if (this.getMap()) {
l.precompose = layers[0].on('precompose', this.precomposeD_.bind(this));
l.postcompose = layers[0].on('postcompose', this.postcomposeD_.bind(this));
l.precompose = layers[0].on('prerender', this.precomposeD_.bind(this));
l.postcompose = layers[0].on('postrender', this.postcomposeD_.bind(this));
this.getMap().renderSync();
}
this.layers_.push(layers[0]);
Expand Down
6 changes: 3 additions & 3 deletions test/dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="mapea" content="yes">
<title>Layer Comparison Test</title>
<link href="http://mapea4-sigc.juntadeandalucia.es/mapea/assets/css/mapea-5.1.0.ol.min.css" rel="stylesheet" />
<link href="https://mapea4-sigc.juntadeandalucia.es/mapea/assets/css/mapea-6.0.0.ol.min.css" rel="stylesheet" />
<style rel="stylesheet">
html,
body {
Expand All @@ -22,8 +22,8 @@

<body>
<div id="mapjs" class="container"></div>
<script type="text/javascript" src="http://mapea4-sigc.juntadeandalucia.es/mapea/js/mapea-5.1.0.ol.min.js"></script>
<script type="text/javascript" src="http://mapea4-sigc.juntadeandalucia.es/mapea/js/configuration-5.1.0.js"></script>
<script type="text/javascript" src="https://mapea4-sigc.juntadeandalucia.es/mapea/js/mapea-6.0.0.ol.min.js"></script>
<script type="text/javascript" src="https://mapea4-sigc.juntadeandalucia.es/mapea/js/configuration-6.0.0.js"></script>
<script type="text/javascript" src="../dist/lyrcompare.ol.min.js"></script>
<script type="text/javascript" src="/main.js"></script>
</body>
Expand Down
6 changes: 3 additions & 3 deletions test/prod.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="mapea" content="yes">
<title>Lyrcompare Production TEST</title>
<link href="http://mapea4-sigc.juntadeandalucia.es/assets/css/mapea-5.1.0.ol.min.css" rel="stylesheet" />
<link href="https://mapea4-sigc.juntadeandalucia.es/assets/css/mapea-6.0.0.ol.min.css" rel="stylesheet" />
<link href="../dist/lyrcompare.ol.min.css" rel="stylesheet" />
<style rel="stylesheet">
html,
Expand All @@ -23,8 +23,8 @@

<body>
<div id="mapjs" class="container"></div>
<script type="text/javascript" src="http://mapea4-sigc.juntadeandalucia.es/js/mapea-5.1.0.ol.min.js"></script>
<script type="text/javascript" src="http://mapea4-sigc.juntadeandalucia.es/js/configuration-5.1.0.js"></script>
<script type="text/javascript" src="https://mapea4-sigc.juntadeandalucia.es/js/mapea-6.0.0.ol.min.js"></script>
<script type="text/javascript" src="https://mapea4-sigc.juntadeandalucia.es/js/configuration-6.0.0.js"></script>
<script type="text/javascript" src="../dist/lyrcompare.ol.min.js"></script>
<script type="text/javascript">
const map = M.map({
Expand Down

0 comments on commit 2c3e076

Please sign in to comment.