bugs fixed for standalone volumes; zoom added
This commit is contained in:
		@@ -1,6 +1,7 @@
 | 
			
		||||
var socket = io.connect()
 | 
			
		||||
var docker = new Docker(socket, error, sigstack, sigcontainer)
 | 
			
		||||
var parameters = docker.graphics.parameters
 | 
			
		||||
var zoom = 1
 | 
			
		||||
var stack = null
 | 
			
		||||
var standalone = null
 | 
			
		||||
 | 
			
		||||
@@ -14,7 +15,6 @@ function error(e) {
 | 
			
		||||
  $('#error').html('<h1>Error</h1><p>'+(new Date()).toLocaleString()+'</p><p>'+e.msg+'</p><pre>'+e.data+'</pre>').show()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function update() {
 | 
			
		||||
  var data = {
 | 
			
		||||
    'containers': docker.containers.get(),
 | 
			
		||||
@@ -88,6 +88,26 @@ function init() {
 | 
			
		||||
             .on('dragstart', (event) => {
 | 
			
		||||
               event.originalEvent.dataTransfer.setData("text", "");
 | 
			
		||||
             })
 | 
			
		||||
  // zoom in
 | 
			
		||||
  $('#zoomin').on('click', () => {
 | 
			
		||||
    zoom *= 1.5
 | 
			
		||||
    if (zoom>500) zoom=500;
 | 
			
		||||
    $('#wizard').width(100*zoom+'%')
 | 
			
		||||
    $('#wizard svg').width('100%')
 | 
			
		||||
  })
 | 
			
		||||
  // zoom reset
 | 
			
		||||
  $('#zoomreset').on('click', () => {
 | 
			
		||||
    zoom = 1
 | 
			
		||||
    $('#wizard').width('100%')
 | 
			
		||||
    $('#wizard svg').width('auto')
 | 
			
		||||
  })
 | 
			
		||||
  // zoom out
 | 
			
		||||
  $('#zoomout').on('click', () => {
 | 
			
		||||
    zoom /= 1.5
 | 
			
		||||
    if (zoom<0.1) zoom=0.1;
 | 
			
		||||
    $('#wizard').width(100*zoom+'%')
 | 
			
		||||
    $('#wizard svg').width('100%')
 | 
			
		||||
  })
 | 
			
		||||
  // restart on click on status
 | 
			
		||||
  $('#status').on('click', () => {
 | 
			
		||||
    docker.unpause()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user