Upgrade to Bootstrap 3

This commit is contained in:
benweet 2013-09-03 23:44:25 +01:00
parent 98c6d5e495
commit 44a70ceb56
3 changed files with 34 additions and 14 deletions

View File

@ -1,5 +1,5 @@
CACHE MANIFEST CACHE MANIFEST
#Date Tue Sep 03 2013 23:30:01 #Date Tue Sep 03 2013 23:44:13
CACHE: CACHE:
index.html index.html

View File

@ -9999,21 +9999,29 @@ function(e) {
t.each(a, function(e, t) { t.each(a, function(e, t) {
t !== a.length - 1 ? e = 0 === e.length ? void 0 : e.substring(0, e.length - 1) : i += o(s.css("padding-bottom")), t !== a.length - 1 ? e = 0 === e.length ? void 0 : e.substring(0, e.length - 1) : i += o(s.css("padding-bottom")),
n(e); n(e);
}), d = [];
var h = 0, m = l.scrollTop();
l.find(".preview-content > .wmd-title").each(function() {
var t = e(this), n = t.position().top + m + o(t.css("margin-top"));
d.push({
startOffset: h,
endOffset: n,
height: n - h
}), h = n;
}); });
var g = l.prop("scrollHeight"); var h = t.last(u).endOffset, m = s[0].scrollHeight, g = m / h;
u = t.map(u, function(e) {
return {
startOffset: e.startOffset * g,
endOffset: e.endOffset * g,
height: e.height * g
};
}), d = [];
var b = 0, y = l.scrollTop();
l.find(".preview-content > .wmd-title").each(function() {
var t = e(this), n = t.position().top + y + o(t.css("margin-top"));
d.push({ d.push({
startOffset: h, startOffset: b,
endOffset: g, endOffset: n,
height: g - h height: n - b
}), b = n;
});
var x = l.prop("scrollHeight");
d.push({
startOffset: b,
endOffset: x,
height: x - b
}), p = -10, f = -10, v(); }), p = -10, f = -10, v();
}, 500), m = !1, g = !1, v = t.debounce(function() { }, 500), m = !1, g = !1, v = t.debounce(function() {
function e(e, n, i, o, r, a) { function e(e, n, i, o, r, a) {

View File

@ -68,6 +68,18 @@ define([
addMdSection(sectionText); addMdSection(sectionText);
}); });
// Apply a coef to manage divergence in some browsers
var theoricalHeight = _.last(mdSectionList).endOffset;
var realHeight = $editorElt[0].scrollHeight;
var coef = realHeight/theoricalHeight;
mdSectionList = _.map(mdSectionList, function(mdSection) {
return {
startOffset: mdSection.startOffset * coef,
endOffset: mdSection.endOffset * coef,
height: mdSection.height * coef,
};
});
// Try to find corresponding sections in the preview // Try to find corresponding sections in the preview
htmlSectionList = []; htmlSectionList = [];
var htmlSectionOffset = 0; var htmlSectionOffset = 0;