Skip to content

Commit

Permalink
hide hl fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Jan 28, 2024
1 parent 831875e commit 097a7c9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hide/comp/cdb/Line.hx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Line extends Component {
element.get(0).classList.remove("hidden");
var id: String = null;
for( c in columns ) {
var e = #if hl ide.createElement("table") #else js.Browser.document.createTableCellElement() #end;
var e = #if hl ide.createElement("td") #else js.Browser.document.createTableCellElement() #end;
e.classList.add("c");
this.element.get(0).appendChild(e);
var cell = new Cell(e, this, c);
Expand Down
14 changes: 13 additions & 1 deletion hide/tools/FileWatcher.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ private typedef Watch = {
#if js
w : js.node.fs.FSWatcher,
#else
w : Dynamic,
w : hl.uv.Fs,
#end
wasChanged : Bool,
changed : Bool,
Expand Down Expand Up @@ -156,6 +156,9 @@ class FileWatcher {
if( elt.nodeName == "BODY" ) return true;
elt = elt.parentElement;
}
#else
var elt = e.element;
if( elt != null && @:privateAccess elt.element.getScene() != null ) return true;
#end
events.remove(e);
return false;
Expand Down Expand Up @@ -187,6 +190,15 @@ class FileWatcher {
w.version++;
haxe.Timer.delay(onEventChanged.bind(w),100);
});
#else
w.w = new hl.uv.Fs(w.path, function(ev) {
if( w.isDir && ev == Change ) return;
if( ev == Change ) w.wasChanged = true;
if( w.changed ) return;
w.changed = true;
w.version++;
haxe.Timer.delay(onEventChanged.bind(w),100);
});
#end
}

Expand Down

0 comments on commit 097a7c9

Please sign in to comment.