sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Webdialog] onresize firing twice

    Scheduled Pinned Locked Moved Developers' Forum
    12 Posts 4 Posters 868 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chrisglasierC Offline
      chrisglasier
      last edited by

      @unknownuser said:

      I don't understand how that code relates to javascript onresize() firing, but if you want to catch the onresize event, your code should be designed to get executed a lot. Resizing is a continuously firing event as it happens.

      Yes I see. That code is only good for double firing. Here is a marked up shot of what I am doing. machine Jan  007.pngMultiple firing is OK except when increasing the number of columns ... they get progressively more or less at each pass. So far I have only experienced two. Any guideline?

      Glad to see you back!

      With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

      1 Reply Last reply Reply Quote 0
      • T Offline
        todd burch
        last edited by

        OK, I think I understand what you are doing now. Why not implement buttons inside your dialog, such as 3 sets of plus/minus buttons to accomplish what you want? It would be more of a standard interface approach to implementing your dialog. Plus, if you ever decided to port to the Mac, your current scheme would not work, as when resizing a Mac dialog, you can only adjust via the bottom right corner.

        1 Reply Last reply Reply Quote 0
        • chrisglasierC Offline
          chrisglasier
          last edited by

          Thanks, Todd, I will do that.

          With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

          1 Reply Last reply Reply Quote 0
          • J Offline
            Jim
            last edited by

            Maybe a timer could be used to ignore the rapid-fire events, and then only call the resize code once?

            Hi

            1 Reply Last reply Reply Quote 0
            • Dan RathbunD Offline
              Dan Rathbun
              last edited by

              onresizeend
              http://msdn.microsoft.com/en-us/library/ms536960(VS.85).aspx

              I'm not here much anymore.

              1 Reply Last reply Reply Quote 0
              • chrisglasierC Offline
                chrisglasier
                last edited by

                Thanks Jim and Dan, but only being able to resize using bottom right on Macs knocks the idea on the head.

                Anyway it's really only changing the number of columns that needs a new method; the ability to see more letters of the words and more rows is calculated from the new size, so is no problem. But I think I will also provide something for machine owners to select column widths and rows to give them alternative control (like shifting gears in an automatic car).

                Thanks again.

                With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                1 Reply Last reply Reply Quote 0
                • chrisglasierC Offline
                  chrisglasier
                  last edited by

                  @dan rathbun said:

                  onresizeend
                  http://msdn.microsoft.com/en-us/library/ms536960(VS.85).aspx

                  I did have a look at that. It seems it's for changing the dimensions of the object in a control selection whatever that is. The name is confusing.

                  With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                  1 Reply Last reply Reply Quote 0
                  • Dan RathbunD Offline
                    Dan Rathbun
                    last edited by

                    @chrisglasier said:

                    @dan rathbun said:

                    onresizeend

                    I did have a look at that. It seems it's for changing the dimensions of the object in a control selection whatever that is. The name is confusing.

                    It has to do with editable content (like a wikipage) which is not what you want. And besides, the phrase "There is no public standard that applies to this event." means it's NOT in the W3C HTML/DHTML spec. It's a MS invention, and may only work in MSIE. (Although, some of those pages on MSDN are out of date.)

                    So that kills cross-platform unless Safari also implements the feature.

                    I'm not here much anymore.

                    1 Reply Last reply Reply Quote 0
                    • Dan RathbunD Offline
                      Dan Rathbun
                      last edited by

                      (Discusssing Javascript not ruby!)

                      Just thinking about this a bit...

                      (1) In order to resize the window, the user must move the mouse OUTSIDE the BODY or DOCUMENT, which fires the onmouseleave event for those Elements.

                      (2) The onresize event fires (perhaps multiple times,) during user sizing. So just set a wasResized flag from 0 to 1 when the event fires. You don't care how many times the flag is set to 1.

                      (3) The user (usually) moves the mouse back into the element, and the onmouseenter event fires. So perhaps in BODY onmouseenter handler, check wasResized, if 1, then reset to 0 and call your layout resize/relayout function.

                      The question is does Safari also implement onmouseenter ??

                      I'm not here much anymore.

                      1 Reply Last reply Reply Quote 0
                      • chrisglasierC Offline
                        chrisglasier
                        last edited by

                        Dan, my view is not to introduce anything that might antagonise Mr Mac ... there's seems enough problems with starting and window.location wobblies as bemoaned in this topic.

                        On the other hand I would quite like machine owners to be able to determine the way their information is best viewed by manipulating the window - I guess maybe later.

                        All seems much easier with .hta's but then so limited in other respects.

                        Thanks for your input.

                        With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement