small cleanup
This commit is contained in:
parent
c54da935ab
commit
1d04dcf5c9
2 changed files with 3 additions and 8 deletions
|
|
@ -39,7 +39,6 @@ var useragent = require("./lib/useragent");
|
||||||
var TextInput = require("./keyboard/textinput").TextInput;
|
var TextInput = require("./keyboard/textinput").TextInput;
|
||||||
var MouseHandler = require("./mouse/mouse_handler").MouseHandler;
|
var MouseHandler = require("./mouse/mouse_handler").MouseHandler;
|
||||||
var FoldHandler = require("./mouse/fold_handler").FoldHandler;
|
var FoldHandler = require("./mouse/fold_handler").FoldHandler;
|
||||||
//var TouchHandler = require("./touch_handler").TouchHandler;
|
|
||||||
var KeyBinding = require("./keyboard/keybinding").KeyBinding;
|
var KeyBinding = require("./keyboard/keybinding").KeyBinding;
|
||||||
var EditSession = require("./edit_session").EditSession;
|
var EditSession = require("./edit_session").EditSession;
|
||||||
var Search = require("./search").Search;
|
var Search = require("./search").Search;
|
||||||
|
|
@ -74,12 +73,8 @@ var Editor = function(renderer, session) {
|
||||||
this.keyBinding = new KeyBinding(this);
|
this.keyBinding = new KeyBinding(this);
|
||||||
|
|
||||||
// TODO detect touch event support
|
// TODO detect touch event support
|
||||||
if (useragent.isIPad) {
|
this.$mouseHandler = new MouseHandler(this);
|
||||||
//this.$mouseHandler = new TouchHandler(this);
|
new FoldHandler(this);
|
||||||
} else {
|
|
||||||
this.$mouseHandler = new MouseHandler(this);
|
|
||||||
new FoldHandler(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$blockScrolling = 0;
|
this.$blockScrolling = 0;
|
||||||
this.$search = new Search().set({
|
this.$search = new Search().set({
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ var ScrollBar = function(parent) {
|
||||||
* Sets the scroll top of the scroll bar.
|
* Sets the scroll top of the scroll bar.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
// TODO: on chrome 17+ after for small zoom levels after this function
|
// TODO: on chrome 17+ for small zoom levels after calling this function
|
||||||
// this.element.scrollTop != scrollTop which makes page to scroll up.
|
// this.element.scrollTop != scrollTop which makes page to scroll up.
|
||||||
this.setScrollTop = function(scrollTop) {
|
this.setScrollTop = function(scrollTop) {
|
||||||
this.element.scrollTop = scrollTop;
|
this.element.scrollTop = scrollTop;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue