Menu

What determines order of icons in Dimmer ?

RR
2009-01-28
2012-12-14
  • RR

    RR - 2009-01-28

    Hi,

    I'm trying to get better understanding of internals of KnxWeb. Since I'm total Javascript newbie, I'm even greater JQuery newbie, but I hope will be able to learn what's going on in KnxWeb - since this is really interesting visualization also for other non EIB systems.

    I'm learning by making slight modifications to existing objects.. I managed to do few things sucessfully, but have problem with changing icons order in Dimmer object (similar question applies also to other objects )...

    For instance: I'd like to display minus on top, then light in the middle (will try to integrate scale display in here) and minus (moins) at the bottom.

    As newbie I obviously made wrong assumption that only changing order of appends will change also order of icons. Currently it goes like this :

       this.plus = $("<img src='images/plus.png'/>").get(0);
    ...
        content.append(this.plus);

        // Moins
        this.moins = $("<img src='images/moins.png'/>").get(0);
    ...
        content.append(this.moins);

            // Ampoule
        this.light = $("<img src='images/light_off.png'/>").get(0);
    ...
        content.append(this.light);

    and I obivously have a lack of understanding of above code, cause changing order doesn't change anything in final output. I guess the trick lies in .get(0) statements - what would be right interpretation of those statements ?

    What determines order of icons in final object in web page ?

    Any other more detailed explanation of KnxWeb internals ?

    I'll post all my findings to Wiki - I guess once we have a basic developer's guide it will be much easier to customize and enhance features of KnxWeb. I'm really impressed on this project...

    Thanks in advance,

    regards,

    Bulek.

     
    • RR

      RR - 2009-01-28

      Well, my thinking was right afterall. It seems that using same style "dimmerDiv" for both objects was a key to success...

      When I added new style also for my shutter object, then display was getting right (didn't know that css is so hard on newbies - I didn't have proper empty line after style and it put object behind background pic...)

      Anyway, my shutter object is now working, now I plan to integrate scale output in same object, so  I can visually get state presentation...

      Regards,

      Bulek.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.