Fixed spell check loading in Android

This commit is contained in:
benweet 2013-10-15 00:34:05 +01:00
parent 537a304906
commit 3cc16b1863
4 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,5 @@
CACHE MANIFEST CACHE MANIFEST
#Date Mon Oct 14 2013 00:50:07 #Date Tue Oct 15 2013 00:32:38
CACHE: CACHE:
index.html index.html

View File

@ -20594,7 +20594,7 @@ if (hljs.LANGUAGES.glsl = function(e) {
m = !1, p = o; m = !1, p = o;
var r = n(o, d, u); var r = n(o, d, u);
r = t.min([ r, s.session.getScreenLength() * s.renderer.lineHeight - s.renderer.$size.scrollerHeight ]), r = t.min([ r, s.session.getScreenLength() * s.renderer.lineHeight - s.renderer.$size.scrollerHeight ]),
Math.abs(r - i) <= 9 ? h = i : (v = !0, e("<div>").animate({ 0 > r && (r = 0), Math.abs(r - i) <= 9 ? h = i : (v = !0, e("<div>").animate({
value: r - i value: r - i
}, { }, {
easing: "easeOutSine", easing: "easeOutSine",
@ -21863,11 +21863,9 @@ if (hljs.LANGUAGES.glsl = function(e) {
}, f.onSaveSettings = function(e) { }, f.onSaveSettings = function(e) {
e.locale = i.getInputValue("#select-spell-check-locale"); e.locale = i.getInputValue("#select-spell-check-locale");
}; };
var g = new Worker("res/worker.js"); var g = void 0, m = !1;
g.postMessage(l);
var m = !1;
f.onInit = function() { f.onInit = function() {
require([ "text!../libs/dictionaries/" + f.config.locale + ".dic.lz", "text!../libs/dictionaries/" + f.config.locale + ".aff.lz" ], function(e, t) { g = new Worker("res/worker.js"), g.postMessage(l), require([ "text!../libs/dictionaries/" + f.config.locale + ".dic.lz", "text!../libs/dictionaries/" + f.config.locale + ".aff.lz" ], function(e, t) {
g.postMessage(JSON.stringify([ "init", s, a, f.config.locale, t, e ])), m = !0, g.postMessage(JSON.stringify([ "init", s, a, f.config.locale, t, e ])), m = !0,
p(); p();
}); });

View File

@ -149,6 +149,8 @@ define([
destScrollTop, destScrollTop,
aceEditor.session.getScreenLength() * aceEditor.renderer.lineHeight - aceEditor.renderer.$size.scrollerHeight aceEditor.session.getScreenLength() * aceEditor.renderer.lineHeight - aceEditor.renderer.$size.scrollerHeight
]); ]);
// If negative, set it to zero
destScrollTop < 0 && (destScrollTop = 0);
if(Math.abs(destScrollTop - editorScrollTop) <= 9) { if(Math.abs(destScrollTop - editorScrollTop) <= 9) {
// Skip the animation if diff is <= 9 // Skip the animation if diff is <= 9
lastEditorScrollTop = editorScrollTop; lastEditorScrollTop = editorScrollTop;

View File

@ -25,12 +25,12 @@ define([
newConfig.locale = utils.getInputValue("#select-spell-check-locale"); newConfig.locale = utils.getInputValue("#select-spell-check-locale");
}; };
// Create a web worker var worker = undefined;
var worker = new Worker('res/worker.js');
worker.postMessage(spellCheckWorkerJS);
var isInited = false; var isInited = false;
spellCheck.onInit = function() { spellCheck.onInit = function() {
// Create a web worker
worker = new Worker('res/worker.js');
worker.postMessage(spellCheckWorkerJS);
require([ require([
'text!../libs/dictionaries/' + spellCheck.config.locale + '.dic.lz', 'text!../libs/dictionaries/' + spellCheck.config.locale + '.dic.lz',
'text!../libs/dictionaries/' + spellCheck.config.locale + '.aff.lz', 'text!../libs/dictionaries/' + spellCheck.config.locale + '.aff.lz',