set view zoom is unused

This commit is contained in:
Matthias Bartelmeß 2012-04-20 12:19:09 +02:00
parent e661f653b1
commit 07ee836946
2 changed files with 1 additions and 34 deletions

View file

@ -894,9 +894,7 @@ down on the page in IE. Strange but it works! */
line-height: 20px;
width: auto;
}
#viewzoommenu {
width: 65px
}
#bottomarea {
height: 28px;
overflow: hidden;

View file

@ -58,7 +58,6 @@ var padeditor = (function()
self.setViewOptions(initialViewOptions);
// view bar
self.initViewZoom();
$("#viewbarcontents").show();
},
initViewOptions: function()
@ -105,36 +104,6 @@ var padeditor = (function()
self.ace.setProperty("textface", (v ? "monospace" : "Arial, sans-serif"));
$("#viewfontmenu").val(v ? "monospace" : "normal");
},
initViewZoom: function()
{
var viewZoom = Number(padcookie.getPref('viewZoom'));
if ((!viewZoom) || isNaN(viewZoom))
{
viewZoom = 100;
}
self.setViewZoom(viewZoom);
$("#viewzoommenu").change(function(evt)
{
// strip initial 'z' from val
self.setViewZoom(Number($("#viewzoommenu").val().substring(1)));
});
},
setViewZoom: function(percent)
{
if (!(percent >= 50 && percent <= 1000))
{
// percent is out of sane range or NaN (which fails comparisons)
return;
}
self.viewZoom = percent;
$("#viewzoommenu").val('z' + percent);
var baseSize = 13;
self.ace.setProperty('textsize', Math.round(baseSize * self.viewZoom / 100));
padcookie.setPref('viewZoom', percent);
},
dispose: function()
{
if (self.ace)