JQuery width() height() always get stage size instead of div size?

I have an Edge project with nested Symbols. In a 3rd level symbol instance, I log it's real size like this.
var stageWidth = $(window).width();
var w = sym.getSymbolElement().width();
console.log(w,stageWidth);
When it's in the creationComplete event handler, it shows the right size.
When it's in the mousemove event handler, it always shows that div size == stage size.
I have tried hours not to find the solution.
What is this problem?

Trying to use logic to locate the problem ( at least trying...)
- if the code is placed in 3rd level, maybe the stageWidth is calculating something else than stage size?
- if the code is placed in stage maybe the w is not targeting the right element?
- Does it mean that during the mouseMove the creation has not completed yet? what could be the explanation for the contradictory results here?
- maybe during mouseMove you are performing some sort of transform or modification on the element, and it makes the width equal to stage size? something to manipulate the w value after its creation?
- maybe w is not reading the size you are actually interested to read ( like the value of w is equal to stage in reality and this is what shown in mouseMove but interestingly in creationComplete you get unequality. Assuming the  reverse scenario, suspecting the creationComplete results instead)
- what happens if you replace mousemove to a click event?
hope it helps, i guess this is how sherlock holmes would try to help you. not enough knowledge on creationComplete to find the flaw here...

Similar Messages

  • Ex-RAID SATA hdd reports old RAID size instead of correct size, k8n neo2 plat

    Hello eveyrone,
    I recently decided to de-RAID my system so i can run longhorn and linux easier. I reformatted the drives, flashed my k8n neo2 platinum to 1.9, and removed the RAID array in the bios. The drives were then detected seperetly. After re-installing windows XP, the system is running more or less ok, but im having 2 lingering problems. First of all, one of my 74gb hard drives is reporting its size to windows as 140 gb (this was the size of the old RAID i deleted, it was made up of 2x74gb drivevs). The drive works fine, except for the fact that it says its got 80gb or so of free space it shouldnt have.
    This probelm was there even in windows setup, so its obviously a motherboard error of some kind.
    Secondly, my MAC address for the nvidia NIC seems to have been erased.
    What is the best procedure to restore it? Im using the gigabyte NIC for now and it is fine.
    Thank you for your help.

    No motherboard error but windows that's messed up .
    Look at this to remove obsolete windows devices : look for drives = 140GB
    http://www.ngohq.com/home.php?page=Articles&go=read&arc_id=36
    Use the :
    set devmgr_show_nonpresent_devices=1 and press enter. Now type devmgmt.msc and click enter. Device Manager will open. Inside Device Manager click on the "View" tab and then click on "Show hidden devices .
    Navigate in device manager to remove the transperant entrys that match your old raid setup (should be named NVIDIA STRIPE under disk drives - uninstall it ) .
    Link provided by supershanks in : https://forum-en.msi.com/index.php?topic=84588.0

  • Scale a div based on width/height of Stage?

    My Stage is set to 100% w/h. I'd like to center a div, and have it scale based on a percentage of the Stage's size. The div contains animated text and images.
    I've seen some similar examples but the Stage always seems to be set to pixels. Any thoughts? Thanks!

    sym.$("contentTobeScaled").css({
       margin : '0 auto',
       position: 'relative'
    This will center the div
    Following can be used to scale your content responsively
    $(window).resize(function() {
      var scaleFactor=  Your Calculations involving either  - $(window).width() - or the height perhaps.
      sym.$("contentTobeScaled").css({'transform': 'scale(' + scaleFactor+ ')'});
      sym.$("contentTobeScaled").css({'-moz-transform': 'scale(' + scaleFactor + ')','-webkit-transform': 'scale(' + scaleFactor+ ')'});
    I was able to perform many complex responsive transformations using .resize and a custom defined variable. The good thing is you can use any mathematical functions to relate these two, in some cases having "inverse" scale factors to make something shrink when windows are expanding. or non-linear effects, discrete effects, anything possible. Enjoy.

  • How to set a minimum width and height for a stage or scene?

    Hello,
    Does anyone how to set a minimum width and height for a stage or scene?
    I tried listening for width/height property value changes and then adjust the width/height if necessary, but that causes unpleasant flickering of the window.
    In JavaFX 2.1 beta SDK for Mac OS, the Stage class has setMinWidth() and setMinHeight() functions which work very well.
    I'm wondering what's the equivalent way to do that when using the FX SDK for Windows.
    Any help is appreciated!
    Thanks.

    I was wondering how to enforce a minimum stage size with JavaFX 2.0.3.The same flickering way you are currently doing it. See: http://javafx-jira.kenai.com/browse/RT-15200 "Need a way to set the minimum size of a window"

  • When I copy and paste from illustrator to PS regardless of option choosen the original shape size is lost, instead of true size shape tries to fill entire width. Fix?

    When I copy and paste from illustrator to PS regardless of option chosen the original shape size is lost, instead of true size shape tries to fill entire width. Same happens when using the new library assets.
    Fix?
    Thanks

    Can't always make sense of its effect, but I suspect what your seeing comes under the influence of Photoshop > Preferences > General > Options > Resize Image During Place

  • Get Browser Width & Height

    Hi,
    I need to develope an RIA application which needs browser width and height. I am able to get it in .mxml file.
    But when I am trying to get it in .as file I am getting error. I am using systemManager.stage.stageWidth &
    systemManager.stage.stageHeight for getting width & height in .mxml file. When I am using the same in .as
    I am getting error. Please reply if any of you have solution for this.
    Thank you.

    What does your AS look like?  Is it referenced from MXML or an AS-only application.  If the latter, there is no systemManager, just access stage.stageWIdth/stageHeight.

  • If I click on an e-mail address link in a web page instead of a blank message opening I always get a pop up screen with a log-in for googlemail. I do not have and do not want a googlemail account. I just want to be able to send e-mails using Outlook.

    If I click on an e-mail address link in a web page instead of a blank message opening I always get a pop up screen with a log-in for googlemail. I do not have and do not want a googlemail account. I just want to be able to send e-mails using Outlook.

    OUtlook was already set as the mail client for FF, and is my operating system (XP)'s default mail programme. therefore problem not solved at all. what I get whenever I follow a link in a webpage to send an e-mail is a little pop up window asking me to sign in to gmail or open an account. any other suggestions?

  • APIs for Adobe Reader to get the x, y co-ords,width,height of all elements (text/image) in a PDF doc

    Hi all,
    I have written a Acrobat plugin using  PDFEdit APIs to extract x, y co-ordinates, width and height of all  elements(objects) in a PDF document.
    Now, I wanted to make the same working on Adobe Reader.I have added the READER_PLUGIN macro enabled in Project settings.
    When I re-compiled the code, I got a bunch of errors saying all PDFEdit APIs are not available under Adobe Reader.
    My  objective is to parse through the entire PDF document and get x, y  co-ordinates, width, height of all PDF objects (especially Image and  Text objects).
    Can anybody help me how to achieve this ?
    Thanks
    Prasanth

    I know that we cannot obtain the PDEContent of a PDF page from Adobe Reader, as PDEContent is modifiable content and as such it cannot be accessible from Adobe Reader.
    Also, as PDFEdit API's does not work for Adobe Reader, we are trying to figure out a way to achieve this for Adobe reader.
    I am curious to know if the COS APIs can help us in this task.
    I tried to read the stream content using PDPageStmGetToken API. I get the data of this format:
    344.88 0 0 91.44 71.882 41.92cm
    Here, as per PDF reference, I am getting only distance from X Axis and distance from Y Axis. But not width and height.
    Can you knidly let us how to get the image attributes (primarly read only attributes like x and y co-ordinates, width and heoght) with Cos APIs.
    Thanks
    Prasanth

  • Trying to sync iPhone to pc but keeps getting internal device error on screen, also showing only 4gb size instead of 32gb. Uninstalled iTunes from pc and reloaded. Powered back up and all songs and info still in place. Anyone had this problem before?

    Trying to sync iPhone to pc but keeps getting internal device error on screen, also showing only 4gb size instead of 32gb. Uninstalled iTunes from pc and reloaded. Powered back up and all songs and info still in place. Anyone had this problem before?

    Doublechecking something Emcee. I see you've got Windows 7 x64, so I'm assuming you've got at least 4 GB of RAM. Do you also have an NVIDIA USB EHCI chipset on that PC? If so, see the following Microsoft document:
    [You encounter problems when you move data over USB from a Windows 7 or Windows Server 2008 R2-based computer that has an NVIDIA USB EHCI chipset and at least 4GB of RAM|http://support.microsoft.com/kb/976972]

  • No width/height set for items.This will cause an infinite loop. Aborting....... How do I get out of this?

    How do I get out of this?

    What are you talking about? The width/height of what? Is this some sort of error message? If so from what?

  • [CS2]How to get the Image Width & Height using JS (ILLUSTRATOR CS2)

    Hi,
    How to get the Image width & height of an Image using javascript .Im using Illustrator CS2.
    Any sample code
    Regards
    MyRiaz

    you can reference the dimensions of a loading image (or swf)
    by referencing the target movieclip's dimensions AFTER loading is
    complete. ie, use preloader code or the onLoadInit() method of a
    moviecliploader listener.

  • How many ways are there to get the Width/Height of an image ?

    I am currently using the following code to get the width and hight of an image :
    BufferedImage Buffered_Image=ImageIO.read(new File(Image_Path));
    int Image_Width=Buffered_Image.getWidth();
    int Image_Height=Buffered_Image.getHeight();I don't need to get the image (*.jpg, *.gif, *.png), just want to know it's dimensions. I wonder how many other ways are available to do the same thing in a Java application ?
    Frank

    Ni_Min wrote:
    That's what I thought. I am asking because I hit a wall and am trying to find a different approach.Yeah, if you only have one file type you can probably write the code to read the header in 20 min.
    I packed my programs into an executable Jar file which I can run and access images on my C:\ drive, everything worked fine until I tried to experiment with something new. I know that I can force JVM to pre-load all my java classes just after it starts, so I deleted the jar right after the program pre-loaded all my classes and tried to see if it would work, but now I get a null pointer error when it tried to get the width/height of an existing image, because ImageIO.read return null. ( The same image is still on my C:\ drive )Sounds like a strange thing you're doing here. What's the point of this?
    So I wonder why it makes a difference after I deleted the jar, what was the problem ( or do I need to pre-load another class related to ImageIO.read ? ), and maybe if I use something else other than the ImageIO.read to get the width/height, I can bypass the problem.I dunno why you need to do this preload stuff and/or delete anything. I'd say leave the JVM and the app alone if possible.

  • Picture duration longer than 4sec not possible? Always gets set to 10min instead.

    Hi,
    I am using iMovie 11 (9.0.4). At some point in my project, I want to show a single photo, but not for the default 4 seconds, but rather for 30 seconds. So I double-click on the clip and in Clip->Duration I try to change the 4,0s to something else.
    First thing which is stange is that I cannot simple set my cursor behind the 4 and hit backspace. Even entering something after the 4 (e.g. 42) is not possible. The only thing which I can do, is setting the cursor behind the 's' and delete everything. Only then am I able to actually enter something in this edit field. Well, I enter 30, but without the 's', because pressing the 's' key on the keyboard is again not possible. Strange? If I hit Enter, 30 get immediatley replaced by 10:00 and now my clip is 10 minutes long. No matter what I enter in this field, it always gets set to 10 minutes.
    Does anyone has a solution for this?

    You simply cannot - repeat cannot - go from one menu to another menu without breaking up the soundtrack. It is not possible under DVD-Video specifications. DVD-Video is graphically dominant, which means when you switch from one menu to another, or from a timeline to a menu, or from a menu to a timeline, the audio
    i must change to the next item's audio stream.
    There is no way around this.
    I have LOST season 1, and will check it out for you & get back to you later on.
    You CAN have continuous audio from the movie into when the highlight layer (subpicture) appears by delaying the appearance of the buttons. The whole thing then becomes one long Motion Menu, with delayed buttons. This can have one long audio stream. Clever timing will make it appear that Audio is seamless if it goes from Motion to Static. I will check this out on Season 1 though.
    Slideshows.
    Best way to do these is to not actually create a slideshow, but instead create a video timeline at a very low bitrate for the video. Set up your stills as & where you want them in relation to your Audio, in your NLE (Premiere Pro?) and export to a 3Mb/sec MPEG-2 clip instead. You may - depending on the pictures - get away with 2.5 or even 2Mb/sec.
    Chapters.
    What you want to do can only be done via scripting.
    Text.
    Subpicture overlays can contain a maximum of 4 colours, including background as colour #1. Blu Ray & HD DVD both get around this and increase the allowed colours in subpicture overlays. What this means to you is that you cannot use drop shadowing or anything other than primitive anti-aliasing. The best you can do is to set the main text colour as the base, and then use the 2 highlight colours at 66% & 33% respectively. It takes practise but can be quite effective.

  • Getting incorrect coordinates, width/height of page-item in actionscript.

    Hi,
    I am developing a Flex extension for InDesign CS5. I am trying to get the coordinates and width/height of a page-item. But, I keep getting incorrect data. Please refer screenshot. The coordinates as I see in the InDesign application are 38.8, 66.02, 117.5, 160.5.
    I used the geometricBounds method to get the coordinates and width/height, but I am getting 29.70, 40.26, 222.07, 178.11. Please refer the screenshot.
    I read somewhere that the coordinates can change with respect to the ruler settings, i.e., it depends on Ruler per Spread, Ruler per Page or Ruler on Spine. But, I couldn't find anything related to this with respect to actionscript.
    How can I get the coordinates and width/height that I see in the InDesign application through actionscript?
    Thanks!

    @poortip87 – make a rectangle with the coordinates ActionScript is suggesting on your page together with your placed image. Then you can see how this correlates to the path points of the rectangle that holds the image.
    Further reading on geometricBounds and their relationship to other geometric properties of page items can be found here:
    Marc Autret:
    Work Around the Width/Height Gap
    http://www.indiscripts.com/post/2009/10/work-around-the-width-height-gap
    Uwe

  • Selected photos come forward but do not always enlarge.  In fact, sometimes they get smaller like thumbnails.  Original size of scanned photos does not seem to matter.

    when I select photos, they always come forward but they do not always enlarge.  In fact, sometimes they get much smaller.   The original size of the scanned photos does not seem make a difference.  Why is this now happening?

    to check the pixel size of the photo you select the photo in iPhoto and click on teh info button
    as to scanning directly into iPhoto - that is not possible - iPhoto does not support scanning - you can only scan and then imported the scanned photos into iPhoto - what parameters are you scanning with?
    You might try scanning to disk adn then importing into iPhoto from disk so you can see the steps more clearly
    LN

Maybe you are looking for