diff --git a/themes/bootstrap3/js/zoomy/canvas-zoomy.js b/themes/bootstrap3/js/zoomy/canvas-zoomy.js index f0509d1cd038dc947b92cd5614b797e9c39b82d4..7ad05f73b6ee8bb337a735ec9dbad624cf453970 100644 --- a/themes/bootstrap3/js/zoomy/canvas-zoomy.js +++ b/themes/bootstrap3/js/zoomy/canvas-zoomy.js @@ -3,6 +3,7 @@ var Zoomy = { // Create init: function(canvas) { this.canvas = canvas; + this.showMinimap = true; this.canvas.width = Math.floor(this.canvas.clientWidth); this.canvas.height = Math.floor(this.canvas.clientHeight); addEventListener('resize', function() { @@ -149,6 +150,8 @@ var Zoomy = { this.context.restore(); // Minimap + console.log(this.showMinimap); + if(!this.showMinimap) return; if(this.minimap == null) { this.minimap = this.initMinimap(); } @@ -317,5 +320,9 @@ var Zoomy = { this.image.height = newHeight; this.rebound(); this.draw(); + }, + toggleMap: function() { + this.showMinimap = !this.showMinimap; + this.draw(); } }; \ No newline at end of file diff --git a/themes/bootstrap3/templates/vudl/views/page.phtml b/themes/bootstrap3/templates/vudl/views/page.phtml index a6760b8ec1229e0588d983922deb903f781dd05a..ac8541b1b4152d0fae5196a040b4977117c9516a 100644 --- a/themes/bootstrap3/templates/vudl/views/page.phtml +++ b/themes/bootstrap3/templates/vudl/views/page.phtml @@ -89,6 +89,9 @@ <a class="btn btn-default" onClick="Zoomy.turnLeft()"><i class="fa fa-rotate-left"></i></a> <a class="btn btn-default" onClick="Zoomy.zoom({deltaY:1})"><i class="fa fa-search-minus"></i></a> <a class="btn btn-default" onClick="Zoomy.zoom(0,1)">[1:1]</a> + <a class="btn btn-default" onClick="Zoomy.toggleMap();$(this).children('.fa').toggleClass('fa fa-toggle-down').toggleClass('fa fa-toggle-up');" title="<?=$this->transEsc('more_info_toggle') ?>"> + <i class="fa fa-toggle-down"></i> + </a> <a class="btn btn-default" onClick="Zoomy.zoom({deltaY:-1})"><i class="fa fa-search-plus"></i></a> <a class="btn btn-default" onClick="Zoomy.turnRight()"><i class="fa fa-rotate-right"></i></a> <canvas id="zoomy"></canvas>