mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
set view zoom is unused
This commit is contained in:
parent
e661f653b1
commit
07ee836946
2 changed files with 1 additions and 34 deletions
|
@ -894,9 +894,7 @@ down on the page in IE. Strange but it works! */
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
#viewzoommenu {
|
|
||||||
width: 65px
|
|
||||||
}
|
|
||||||
#bottomarea {
|
#bottomarea {
|
||||||
height: 28px;
|
height: 28px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
@ -58,7 +58,6 @@ var padeditor = (function()
|
||||||
self.setViewOptions(initialViewOptions);
|
self.setViewOptions(initialViewOptions);
|
||||||
|
|
||||||
// view bar
|
// view bar
|
||||||
self.initViewZoom();
|
|
||||||
$("#viewbarcontents").show();
|
$("#viewbarcontents").show();
|
||||||
},
|
},
|
||||||
initViewOptions: function()
|
initViewOptions: function()
|
||||||
|
@ -105,36 +104,6 @@ var padeditor = (function()
|
||||||
self.ace.setProperty("textface", (v ? "monospace" : "Arial, sans-serif"));
|
self.ace.setProperty("textface", (v ? "monospace" : "Arial, sans-serif"));
|
||||||
$("#viewfontmenu").val(v ? "monospace" : "normal");
|
$("#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()
|
dispose: function()
|
||||||
{
|
{
|
||||||
if (self.ace)
|
if (self.ace)
|
||||||
|
|
Loading…
Reference in a new issue