Skip to content

Commit

Permalink
Merge pull request #5 from guadaltel/master
Browse files Browse the repository at this point in the history
Implementacion de compatibilidad para Mapea v6.0.0
  • Loading branch information
fbma authored Apr 8, 2021
2 parents eceb13a + d1634ae commit 3d1895a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
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.

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

0 comments on commit 3d1895a

Please sign in to comment.