mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-22 14:33:51 +00:00
vlist.ts
This commit is contained in:
parent
49309feffc
commit
c422de0571
@ -522,10 +522,10 @@ function require(modname) {
|
||||
<script src="tss/js/tss/AudioLooper.js"></script>
|
||||
<script src="tss/js/Log.js"></script>
|
||||
|
||||
<script src="gen/vlist.js"></script>
|
||||
<script src="gen/video/tms9918a.js"></script>
|
||||
<script src="gen/util.js"></script>
|
||||
<script src="gen/store.js"></script>
|
||||
<script src="src/vlist.js"></script>
|
||||
<script src="gen/emu.js"></script>
|
||||
<script src="gen/baseplatform.js"></script>
|
||||
<script src="gen/analysis.js"></script>
|
||||
|
@ -7,7 +7,7 @@ export interface SavesState<S> {
|
||||
export interface Bus {
|
||||
read(a:number) : number;
|
||||
write(a:number, v:number) : void;
|
||||
// TODO: readConst?(a:number) : number;
|
||||
readConst?(a:number) : number;
|
||||
}
|
||||
|
||||
export interface ClockBased {
|
||||
@ -89,7 +89,7 @@ export interface Interruptable<IT> {
|
||||
// TODO
|
||||
export interface AcceptsInput<CS> {
|
||||
setInput(key:number, code:number, flags:number) : void;
|
||||
loadControlsState(cs:CS);
|
||||
loadControlsState(cs:CS) : void;
|
||||
saveControlsState() : CS;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ function VirtualList(config) {
|
||||
function onScroll(e) {
|
||||
var scrollTop = e.target.scrollTop; // Triggers reflow
|
||||
if (!lastRepaintY || Math.abs(scrollTop - lastRepaintY) > maxBuffer) {
|
||||
var first = parseInt(scrollTop / itemHeight) - screenItemsLen;
|
||||
var first = (scrollTop / itemHeight) - screenItemsLen;
|
||||
self._renderChunk(self.container, first < 0 ? 0 : first);
|
||||
lastRepaintY = scrollTop;
|
||||
}
|
||||
@ -141,17 +141,17 @@ VirtualList.createContainer = function(w, h) {
|
||||
c.style.height = h;
|
||||
c.style.overflow = 'auto';
|
||||
c.style.position = 'relative';
|
||||
c.style.padding = 0;
|
||||
c.style.padding = '0';
|
||||
c.style.border = '1px solid black';
|
||||
return c;
|
||||
};
|
||||
|
||||
VirtualList.createScroller = function(h) {
|
||||
var scroller = document.createElement('div');
|
||||
scroller.style.opacity = 0;
|
||||
scroller.style.opacity = '0';
|
||||
scroller.style.position = 'absolute';
|
||||
scroller.style.top = 0;
|
||||
scroller.style.left = 0;
|
||||
scroller.style.top = '0';
|
||||
scroller.style.left = '0';
|
||||
scroller.style.width = '1px';
|
||||
scroller.style.height = h + 'px';
|
||||
return scroller;
|
Loading…
Reference in New Issue
Block a user