Quantcast

ia7 floorplan positioning issues

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ia7 floorplan positioning issues

Tobias Sachs
Hi all,
the current ia7 floorplans positioning of the icons did not work for me.
Positions were either correct on my Android devices or on my Desktop PCs...
So I did try to fix the positioning issues. This is basically what I did:

       * use the width of the element containing the fp image (#graphic)
         and use this size as the base for resizing (instead of
         $(window).width() to make the floorplan work on bigger screens
         too. For those the the floorplan image is smaller than the windows
         width)
       * scale the fp image to the width of #graphic
       * use the new size of the fp image to calculate the position of
the Items
       * use .offset() for positioning instead of relative positions
       * scale the item icons proportional to the original size of the fp
         background image. When you create your background image you should
         choose the image size it in a way that the XXX_48.png variants of
         the icons fit well into it.
       * coordinates of fp items are now the center of the items icon
and not
         the top left corner.
       * Add debug option: If you append '&show_pos' to the flooplan URL you
         see the coordinates above the fp image as you move the mouse over
         the image. This also adds the possibility to click on the fp to
copy
         the coordinates, it's a bit clumsy because Firefox nags you about
         the popup, but the convenience to be able to c&p the
coordinates wins
         for me...

I still have an issue: All icon positions are really off on the initial
load of the floorplan. And I can not figure out why. The calculated
offsets look OK but the icons are still drawn at the wrong positions. A
subsequent state update or a resize of the browser window fixes the
positioning. All hints on how to fix this are really appreciated, I
tried a lot of stuff and have still no idea why I can't get it to work :-(

It would be nice if others could checkout if this is working for them. I
only have android devices of several screensizes and Firefox and
Googlechrome running on Linux to test this.

The branch with my changes can be found here:
https://github.com/tobser/misterhouse/tree/floorplan_positions

Greetings,
Tobi

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ia7 floorplan positioning issues

H Plato
Do you want to merge in my latest ia7 branch — be good to get some feedback and testing. Once you merge, then send in a pull request and I’ll update my branch and I can test.

with the v1.2 update, there is a common code file called ia7_collection_updater. It will add a new item 700 to the collections.json file, which is now dynamically set to what the user is logged in as. It has to be enabled, and then will update the collections.json files at the next startup.

v1.2 contains;
  - updated the setup mr.house sections so that they all now work within IA7, instead of returning IA5-style code.
  - updated mail & comics to work natively in IA7.
  - ia7_prefs can now set state colors
  - undefined is now purple so that blue can be used as an indicator color (ie HVAC - orange for heating, blue for cooling)
  - Authentication system - gear is red for not logged in, green for family, purple for admin. pages that require admin now have a nice password modal.
  - and the v1.1 improvements (web audio, notifications, rrd last update information).

Be nice to work in a user specified floorplan basemap directory. I think I have a way to solve this, and I can try it after the floorplan stuff is merged.

> On Apr 20, 2016, at 2:13 PM, Tobias Sachs <[hidden email]> wrote:
>
> Hi all,
> the current ia7 floorplans positioning of the icons did not work for me.
> Positions were either correct on my Android devices or on my Desktop PCs...
> So I did try to fix the positioning issues. This is basically what I did:
>
>       * use the width of the element containing the fp image (#graphic)
>         and use this size as the base for resizing (instead of
>         $(window).width() to make the floorplan work on bigger screens
>         too. For those the the floorplan image is smaller than the windows
>         width)
>       * scale the fp image to the width of #graphic
>       * use the new size of the fp image to calculate the position of
> the Items
>       * use .offset() for positioning instead of relative positions
>       * scale the item icons proportional to the original size of the fp
>         background image. When you create your background image you should
>         choose the image size it in a way that the XXX_48.png variants of
>         the icons fit well into it.
>       * coordinates of fp items are now the center of the items icon
> and not
>         the top left corner.
>       * Add debug option: If you append '&show_pos' to the flooplan URL you
>         see the coordinates above the fp image as you move the mouse over
>         the image. This also adds the possibility to click on the fp to
> copy
>         the coordinates, it's a bit clumsy because Firefox nags you about
>         the popup, but the convenience to be able to c&p the
> coordinates wins
>         for me...
>
> I still have an issue: All icon positions are really off on the initial
> load of the floorplan. And I can not figure out why. The calculated
> offsets look OK but the icons are still drawn at the wrong positions. A
> subsequent state update or a resize of the browser window fixes the
> positioning. All hints on how to fix this are really appreciated, I
> tried a lot of stuff and have still no idea why I can't get it to work :-(
>
> It would be nice if others could checkout if this is working for them. I
> only have android devices of several screensizes and Firefox and
> Googlechrome running on Linux to test this.
>
> The branch with my changes can be found here:
> https://github.com/tobser/misterhouse/tree/floorplan_positions
>
> Greetings,
> Tobi
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ia7 floorplan positioning issues

Tobias Sachs
Hi,
I sent the pull request via github. I hope i didn't break anything
with my merge...

I used the ia7_collection_updater and it works fine, but it creates
files in the mh source directory and now git complains about untracked
files. Maybe it would be better to store the ia7 version inside the
collection.js file. One could add something like
    "meta-data" : {
        "ia-version": "1.2"
    }             .
to the file. I think the script should only change the files in the user
dirs, .
Haven't tested the other new features and probably won't get to check
those within the next two weeks or so.. :-/

Tobi

H Plato <[hidden email]> wrote:

> Do you want to merge in my latest ia7 branch — be good to get some feedback and testing. Once you merge, then send in a pull request and I’ll update my branch and I can test.
>
> with the v1.2 update, there is a common code file called ia7_collection_updater. It will add a new item 700 to the collections.json file, which is now dynamically set to what the user is logged in as. It has to be enabled, and then will update the collections.json files at the next startup.
>
> v1.2 contains;
>   - updated the setup mr.house sections so that they all now work within IA7, instead of returning IA5-style code.
>   - updated mail & comics to work natively in IA7.
>   - ia7_prefs can now set state colors
>   - undefined is now purple so that blue can be used as an indicator color (ie HVAC - orange for heating, blue for cooling)
>   - Authentication system - gear is red for not logged in, green for family, purple for admin. pages that require admin now have a nice password modal.
>   - and the v1.1 improvements (web audio, notifications, rrd last update information).
>
> Be nice to work in a user specified floorplan basemap directory. I think I have a way to solve this, and I can try it after the floorplan stuff is merged.
>
> > On Apr 20, 2016, at 2:13 PM, Tobias Sachs <[hidden email]> wrote:
> >
> > Hi all,
> > the current ia7 floorplans positioning of the icons did not work for me.
> > Positions were either correct on my Android devices or on my Desktop PCs...
> > So I did try to fix the positioning issues. This is basically what I did:
> >
> >       * use the width of the element containing the fp image (#graphic)
> >         and use this size as the base for resizing (instead of
> >         $(window).width() to make the floorplan work on bigger screens
> >         too. For those the the floorplan image is smaller than the windows
> >         width)
> >       * scale the fp image to the width of #graphic
> >       * use the new size of the fp image to calculate the position of
> > the Items
> >       * use .offset() for positioning instead of relative positions
> >       * scale the item icons proportional to the original size of the fp
> >         background image. When you create your background image you should
> >         choose the image size it in a way that the XXX_48.png variants of
> >         the icons fit well into it.
> >       * coordinates of fp items are now the center of the items icon
> > and not
> >         the top left corner.
> >       * Add debug option: If you append '&show_pos' to the flooplan URL you
> >         see the coordinates above the fp image as you move the mouse over
> >         the image. This also adds the possibility to click on the fp to
> > copy
> >         the coordinates, it's a bit clumsy because Firefox nags you about
> >         the popup, but the convenience to be able to c&p the
> > coordinates wins
> >         for me...
> >
> > I still have an issue: All icon positions are really off on the initial
> > load of the floorplan. And I can not figure out why. The calculated
> > offsets look OK but the icons are still drawn at the wrong positions. A
> > subsequent state update or a resize of the browser window fixes the
> > positioning. All hints on how to fix this are really appreciated, I
> > tried a lot of stuff and have still no idea why I can't get it to work :-(
> >
> > It would be nice if others could checkout if this is working for them. I
> > only have android devices of several screensizes and Firefox and
> > Googlechrome running on Linux to test this.
> >
> > The branch with my changes can be found here:
> > https://github.com/tobser/misterhouse/tree/floorplan_positions
> >
> > Greetings,
> > Tobi
> >
> > ------------------------------------------------------------------------------
> > Find and fix application performance issues faster with Applications Manager
> > Applications Manager provides deep performance insights into multiple tiers of
> > your business applications. It resolves application problems quickly and
> > reduces your MTTR. Get your free trial!
> > https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> > ________________________________________________________
> > To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
> >
>

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Loading...