Skip to content

Commit

Permalink
Merge pull request #5 from sigcorporativo-ja/develop
Browse files Browse the repository at this point in the history
v1.1.0
  • Loading branch information
fbma authored Jun 14, 2024
2 parents c081cda + c720155 commit b97b1c8
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dist/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"name": "Mirrorpanel",
"description": "Plugin que permite comparar varias capas dividiendo la pantalla en varias partes.",
"text": "Plugin que permite comparar varias capas dividiendo la pantalla en varias partes. Los mapas tienen sus vistas sincronizadas, y podemos ver la representación de una misma zona por distintas capas.",
"version": "1.0.1",
"version": "1.1.0",
"date": "Abril, 2021",
"author": "",
"org": "",
Expand Down
2 changes: 1 addition & 1 deletion dist/mirrorpanel.ol.min.css

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mirrorpanel.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": "Mirrorpanel",
"version": "1.0.1",
"version": "1.1.0",
"description": "",
"keywords": [
"map",
Expand Down
6 changes: 3 additions & 3 deletions src/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
"name": "Mirrorpanel",
"description": "Plugin que permite comparar varias capas dividiendo la pantalla en varias partes.",
"text": "Plugin que permite comparar varias capas dividiendo la pantalla en varias partes. Los mapas tienen sus vistas sincronizadas, y podemos ver la representación de una misma zona por distintas capas.",
"version": "1.0.1",
"date": "Abril, 2021",
"version": "1.1.0",
"date": "Junio, 2024",
"author": "",
"org": "",
"tags": "mapea,plugin",
Expand Down Expand Up @@ -118,4 +118,4 @@
]
}
}
}
}
12 changes: 12 additions & 0 deletions src/facade/assets/css/mirrorpanel.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@
font-display: block;
}

/** Estilos herramienta*/

#mapjs,
#map {
height: 100% !important;
margin-top: 0px !important;
}

#lienzo {
height: 94.7vh;
margin-top: -1rem !important;
}

/** Estilos propios*/

Expand Down
13 changes: 9 additions & 4 deletions src/facade/js/mirrorpanelcontrol.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export default class MirrorpanelControl extends M.Control {
bigContainer.classList.add('mirrorpanel-grid');

const mapjsA = document.getElementById("mapjs") || document.getElementById("map");
document.body.insertBefore(bigContainer, mapjsA);
mapjsA.parentNode.insertBefore(bigContainer, mapjsA);
mapjsA.classList.add('mirror1');
bigContainer.appendChild(mapjsA);

Expand Down Expand Up @@ -302,7 +302,9 @@ export default class MirrorpanelControl extends M.Control {
projection: this.map_.getProjection().code + '*' + this.map_.getProjection().units,
zoom: this.map_.getZoom(),
});
this.mapL[mapLyr].getMapImpl().setView(this.map_.getMapImpl().getView());
setTimeout(() => {
this.mapL[mapLyr].getMapImpl().setView(this.map_.getMapImpl().getView());
}, 500);

if (this.showCursors) { this.addLayerCursor(mapLyr); }
if (this.mirrorLayers.length > 0) {
Expand Down Expand Up @@ -332,7 +334,10 @@ export default class MirrorpanelControl extends M.Control {
},
});

this.lyrCursor[mapLyr].addFeatures([this.featureLyrCursor[mapLyr]]);
setTimeout(() => {
this.lyrCursor[mapLyr].addFeatures([this.featureLyrCursor[mapLyr]]);
}, 2000);

this.lyrCursor[mapLyr].setStyle(this.styleCursor);
this.lyrCursor[mapLyr].setZIndex(5000);
this.mapL[mapLyr].addLayers(this.lyrCursor[mapLyr]);
Expand Down Expand Up @@ -381,7 +386,7 @@ export default class MirrorpanelControl extends M.Control {
const mapjsA = document.getElementById("mapjs") || document.getElementById("map");
mapjsA.style.display = "block";
mapjsA.classList.remove('mirror1');
document.body.insertBefore(mapjsA, lienzo);
lienzo.parentNode.insertBefore(mapjsA, lienzo);

// Load the main container
document.getElementById("lienzo").remove();
Expand Down

0 comments on commit b97b1c8

Please sign in to comment.