added checkmarks to window list; fixed test

This commit is contained in:
Steven Hugg 2018-07-14 15:10:09 -05:00
parent 8cfc15ecb7
commit 12ad4648dc
6 changed files with 16 additions and 5 deletions

View File

@ -274,3 +274,9 @@ canvas.pixelated {
.twitter-follow-button:hover {
color:#99ffff;
}
.dropdown-item-checked::before {
position: absolute;
left: .4rem;
content: '\2713';
font-weight: 400;
}

View File

@ -46,7 +46,6 @@ TODO:
- show tool-specific (readonly) include files
- verilog debugging makes it slow
- fix VCS mame
- checkmarks for active window
- remove FPS and play controls when Verilog scope paused

View File

@ -120,8 +120,10 @@ function refreshWindowList() {
ul.append(li);
if (createfn) {
projectWindows.setCreateFunc(id, createfn);
$(a).click(function() {
$(a).click(function(e) {
projectWindows.createOrShow(id);
ul.find('a').removeClass("dropdown-item-checked");
ul.find(e.target).addClass("dropdown-item-checked");
});
}
}
@ -194,7 +196,7 @@ function loadProject(preset_id:string) {
// we need this to build create functions for the editor (TODO?)
refreshWindowList();
// show main file
projectWindows.createOrShow(preset_id);
projectWindows.createOrShow(preset_id); // TODO: add checkmark
}
});
}

View File

@ -14,6 +14,7 @@ export class ProjectWindows {
id2window : {[id:string]:ProjectView} = {};
id2createfn : {[id:string]:WindowCreateFunction} = {};
id2div : {[id:string]:HTMLElement} = {};
activeid : string;
activewnd : ProjectView;
activediv : HTMLElement;
lasterrors : WorkerError[];
@ -47,6 +48,7 @@ export class ProjectWindows {
this.refresh();
this.refreshErrors();
}
this.activeid = id;
return wnd;
}
@ -80,6 +82,8 @@ export class ProjectWindows {
getActive() : ProjectView { return this.activewnd; }
getActiveID() : string { return this.activeid; }
getCurrentText() : string {
if (this.activewnd && this.activewnd.getValue)
return this.activewnd.getValue();

View File

@ -1169,7 +1169,7 @@ function compileVerilator(step) {
noInitialRun:true,
print:print_fn,
printErr:match_fn,
//TOTAL_MEMORY:64*1024*1024,
TOTAL_MEMORY:256*1024*1024,
});
var topmod = detectTopModuleName(code);
var FS = verilator_mod['FS'];

View File

@ -196,7 +196,7 @@ describe('Worker', function() {
assert.ok(fn);
done(err, msg);
};
doBuild(msgs, done2, 253177, 0, 0);
doBuild(msgs, done2, 1996909, 0, 0);
});
it('should NOT preprocess SDCC', function(done) {
compile('sdcc', 'int x=0\n#bah\n', 'mw8080bw', done, 0, 0, 1);