From a518f0f2ade96396ffcf1ebb8410d598d402aeef Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Thu, 5 Jul 2018 21:37:19 -0500 Subject: [PATCH] added typescript to dev deps --- package.json | 1 + src/ui.js | 6 ------ src/views.ts | 7 ++++++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 1d0bbf61..10607edf 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "author": "Steven Hugg", "dependencies": {}, "devDependencies": { + "typescript": "^2.9.2", "@types/jquery": "^3.3.4", "mocha": "^3.2.0", "mocha-phantomjs": "^4.1.0", diff --git a/src/ui.js b/src/ui.js index 34822c9d..8eeadf73 100644 --- a/src/ui.js +++ b/src/ui.js @@ -501,12 +501,6 @@ function clearBreakpoint() { showMemory(); } -function jumpToLine(ed, i) { - var t = ed.charCoords({line: i, ch: 0}, "local").top; - var middleHeight = ed.getScrollerElement().offsetHeight / 2; - ed.scrollTo(null, t - middleHeight - 5); -} - function resetAndDebug() { if (platform.setupDebug && platform.readAddress) { // TODO?? clearBreakpoint(); diff --git a/src/views.ts b/src/views.ts index 0226dece..cf819ab8 100644 --- a/src/views.ts +++ b/src/views.ts @@ -13,7 +13,12 @@ var pixeditframe; // TODO: functions var inspectVariable; -var jumpToLine; + +function jumpToLine(ed, i:number) { + var t = ed.charCoords({line: i, ch: 0}, "local").top; + var middleHeight = ed.getScrollerElement().offsetHeight / 2; + ed.scrollTo(null, t - middleHeight - 5); +} // TODO: remove some calls of global functions function SourceEditor(path, mode) {