Przeglądaj źródła

Merge pull request #245 from mrxiaozhuox/master

Jonathan Kelley 3 lat temu
rodzic
commit
a7e0fffb43

+ 0 - 0
packages/desktop/src/default_icon.bin → packages/desktop/src/assets/default_icon.bin


+ 0 - 0
packages/desktop/src/default_icon.png → packages/desktop/src/assets/default_icon.png


+ 1 - 1
packages/desktop/src/cfg.rs

@@ -88,7 +88,7 @@ impl DesktopConfig {
 
 impl DesktopConfig {
     pub(crate) fn with_default_icon(mut self) -> Self {
-        let bin: &[u8] = include_bytes!("default_icon.bin");
+        let bin: &[u8] = include_bytes!("./assets/default_icon.bin");
         let rgba = Icon::from_rgba(bin.to_owned(), 460, 460).expect("image parse failed");
         self.window.window.window_icon = Some(rgba);
         self

+ 2 - 1
packages/interpreter/src/interpreter.js

@@ -102,10 +102,11 @@ export class Interpreter {
   SetAttribute(root, field, value, ns) {
     const name = field;
     const node = this.nodes[root];
+    console.log(ns);
     if (ns === "style") {
       // @ts-ignore
       node.style[name] = value;
-    } else if (ns != null || ns !== undefined) {
+    } else if (ns != null || ns != undefined) {
       node.setAttributeNS(ns, name, value);
     } else {
       switch (name) {