mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-22 14:33:51 +00:00
fixed for safari
This commit is contained in:
parent
4447d85008
commit
37657d458b
28
src/ui.js
28
src/ui.js
@ -132,13 +132,13 @@ var disasmview = CodeMirror(document.getElementById('disassembly'), {
|
|||||||
});
|
});
|
||||||
scrollProfileView(disasmview);
|
scrollProfileView(disasmview);
|
||||||
|
|
||||||
var memoryview;
|
var memorylist;
|
||||||
var profileview;
|
var profilelist;
|
||||||
|
|
||||||
function scrollProfileView(_ed) {
|
function scrollProfileView(_ed) {
|
||||||
_ed.on('scroll', function(ed, changeobj) {
|
_ed.on('scroll', function(ed, changeobj) {
|
||||||
if (profileview) {
|
if (profilelist) {
|
||||||
profileview.container.scrollTop = ed.getScrollInfo().top;
|
profilelist.container.scrollTop = ed.getScrollInfo().top;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -717,7 +717,7 @@ function toggleDisassembly() {
|
|||||||
$("#disassembly").toggle();
|
$("#disassembly").toggle();
|
||||||
$("#editor").toggle();
|
$("#editor").toggle();
|
||||||
updateDisassembly();
|
updateDisassembly();
|
||||||
if ($("#profileview").is(':visible')) createProfileWindow();
|
if (profilelist) createProfileWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetAndDebug() {
|
function resetAndDebug() {
|
||||||
@ -756,7 +756,7 @@ function updateDebugWindows() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateProfileWindow() {
|
function updateProfileWindow() {
|
||||||
if (profileview && sourcefile) {
|
if (profilelist && sourcefile) {
|
||||||
$("#profileview").find('[data-index]').each(function(i,e) {
|
$("#profileview").find('[data-index]').each(function(i,e) {
|
||||||
var div = $(e);
|
var div = $(e);
|
||||||
var lineno = div.attr('data-index') | 0;
|
var lineno = div.attr('data-index') | 0;
|
||||||
@ -771,7 +771,7 @@ function updateProfileWindow() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateMemoryWindow() {
|
function updateMemoryWindow() {
|
||||||
if (memoryview) {
|
if (memorylist) {
|
||||||
$("#memoryview").find('[data-index]').each(function(i,e) {
|
$("#memoryview").find('[data-index]').each(function(i,e) {
|
||||||
var div = $(e);
|
var div = $(e);
|
||||||
var row = div.attr('data-index');
|
var row = div.attr('data-index');
|
||||||
@ -873,7 +873,7 @@ function findMemoryWindowLine(a) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function showMemoryWindow() {
|
function showMemoryWindow() {
|
||||||
memoryview = new VirtualList({
|
memorylist = new VirtualList({
|
||||||
w:$("#emulator").width(),
|
w:$("#emulator").width(),
|
||||||
h:$("#emulator").height(),
|
h:$("#emulator").height(),
|
||||||
itemHeight: getVisibleEditorLineHeight(),
|
itemHeight: getVisibleEditorLineHeight(),
|
||||||
@ -889,16 +889,16 @@ function showMemoryWindow() {
|
|||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#memoryview").empty().append(memoryview.container);
|
$("#memoryview").empty().append(memorylist.container);
|
||||||
updateMemoryWindow();
|
updateMemoryWindow();
|
||||||
if (compparams && dumplines)
|
if (compparams && dumplines)
|
||||||
memoryview.scrollToItem(findMemoryWindowLine(compparams.data_start));
|
memorylist.scrollToItem(findMemoryWindowLine(compparams.data_start));
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleMemoryWindow() {
|
function toggleMemoryWindow() {
|
||||||
if ($("#profileview").is(':visible')) toggleProfileWindow();
|
if ($("#profileview").is(':visible')) toggleProfileWindow();
|
||||||
if ($("#memoryview").is(':visible')) {
|
if ($("#memoryview").is(':visible')) {
|
||||||
memoryview = null;
|
memorylist = null;
|
||||||
$("#emulator").show();
|
$("#emulator").show();
|
||||||
$("#memoryview").hide();
|
$("#memoryview").hide();
|
||||||
} else {
|
} else {
|
||||||
@ -909,7 +909,7 @@ function toggleMemoryWindow() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createProfileWindow() {
|
function createProfileWindow() {
|
||||||
profileview = new VirtualList({
|
profilelist = new VirtualList({
|
||||||
w:$("#emulator").width(),
|
w:$("#emulator").width(),
|
||||||
h:$("#emulator").height(),
|
h:$("#emulator").height(),
|
||||||
itemHeight: getVisibleEditorLineHeight(),
|
itemHeight: getVisibleEditorLineHeight(),
|
||||||
@ -920,7 +920,7 @@ function createProfileWindow() {
|
|||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#profileview").empty().append(profileview.container);
|
$("#profileview").empty().append(profilelist.container);
|
||||||
updateProfileWindow();
|
updateProfileWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -982,7 +982,7 @@ function getProfileLine(line) {
|
|||||||
function toggleProfileWindow() {
|
function toggleProfileWindow() {
|
||||||
if ($("#memoryview").is(':visible')) toggleMemoryWindow();
|
if ($("#memoryview").is(':visible')) toggleMemoryWindow();
|
||||||
if ($("#profileview").is(':visible')) {
|
if ($("#profileview").is(':visible')) {
|
||||||
profileview = null;
|
profilelist = null;
|
||||||
platform.getProbe().deactivate();
|
platform.getProbe().deactivate();
|
||||||
$("#emulator").show();
|
$("#emulator").show();
|
||||||
$("#profileview").hide();
|
$("#profileview").hide();
|
||||||
|
@ -897,6 +897,7 @@ var TOOLS = {
|
|||||||
'sdasz80': assemblelinkSDASZ80,
|
'sdasz80': assemblelinkSDASZ80,
|
||||||
'sdcc': compileSDCC,
|
'sdcc': compileSDCC,
|
||||||
'xasm6809': assembleXASM6809,
|
'xasm6809': assembleXASM6809,
|
||||||
|
//'nakenz80': assembleNAKEN_Z80,
|
||||||
}
|
}
|
||||||
|
|
||||||
var TOOL_PRELOADFS = {
|
var TOOL_PRELOADFS = {
|
||||||
|
Loading…
Reference in New Issue
Block a user