fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Readonly document view.
[redakcja.git]
/
platforma
/
static
/
js
/
lib
/
codemirror
/
codemirror.js
diff --git
a/platforma/static/js/lib/codemirror/codemirror.js
b/platforma/static/js/lib/codemirror/codemirror.js
index
4eb5fb7
..
8c62dab
100644
(file)
--- a/
platforma/static/js/lib/codemirror/codemirror.js
+++ b/
platforma/static/js/lib/codemirror/codemirror.js
@@
-79,22
+79,8
@@
var CodeMirror = (function(){
var win = frame.contentWindow, doc = win.document,
nums = frame.nextSibling, scroller = nums.firstChild;
var win = frame.contentWindow, doc = win.document,
nums = frame.nextSibling, scroller = nums.firstChild;
- var nextNum = 1, barWidth = null;
- function sizeBar() {
- if (!frame.offsetWidth || !win.Editor) {
- for (var cur = frame; cur.parentNode; cur = cur.parentNode) {
- if (cur != document) {
- clearInterval(sizeInterval);
- return;
- }
- }
- }
+ var nextNum = 1;
- if (nums.offsetWidth != barWidth) {
- barWidth = nums.offsetWidth;
- nums.style.left = "-" + (frame.parentNode.style.marginLeft = barWidth + "px");
- }
- }
function update() {
var diff = 20 + Math.max(doc.body.offsetHeight, frame.offsetHeight) - scroller.offsetHeight;
for (var n = Math.ceil(diff / 10); n > 0; n--) {
function update() {
var diff = 20 + Math.max(doc.body.offsetHeight, frame.offsetHeight) - scroller.offsetHeight;
for (var n = Math.ceil(diff / 10); n > 0; n--) {
@@
-104,11
+90,10
@@
var CodeMirror = (function(){
}
nums.scrollTop = doc.body.scrollTop || doc.documentElement.scrollTop || 0;
}
}
nums.scrollTop = doc.body.scrollTop || doc.documentElement.scrollTop || 0;
}
- sizeBar();
+
update();
win.addEventHandler(win, "scroll", update);
win.addEventHandler(win, "resize", update);
update();
win.addEventHandler(win, "scroll", update);
win.addEventHandler(win, "resize", update);
- var sizeInterval = setInterval(sizeBar, 500);
}
function CodeMirror(place, options) {
}
function CodeMirror(place, options) {