Center on resize
This commit is contained in:
parent
f7b5a5e2a4
commit
3d885b2fc5
@ -83,6 +83,7 @@ function Ronin()
|
||||
|
||||
this.on_resize = function()
|
||||
{
|
||||
ronin.frame.center();
|
||||
}
|
||||
|
||||
this.on_drag = function()
|
||||
|
@ -88,6 +88,12 @@ function Frame(rune)
|
||||
setTimeout(function(){ ronin.frame.blink(); }, 30);
|
||||
}
|
||||
|
||||
this.center = function()
|
||||
{
|
||||
ronin.frame.element.style.left = (window.innerWidth/2) - (ronin.frame.element.width/4);
|
||||
ronin.frame.element.style.top = (window.innerHeight/2) - (ronin.frame.element.height/4) - 30;
|
||||
}
|
||||
|
||||
this.select_layer = function(layer)
|
||||
{
|
||||
this.active_layer = layer;
|
||||
|
Loading…
x
Reference in New Issue
Block a user