viewport

Multiple viewports of the same DisplayObject

Is it possible to have multiple view of the same display object? (e.g. same-computer multi-player game using split screen) The sample code that failed to work follows: var content: Sprite = new Sprite(); var v1: Sprite = new Sprite(); var v2: Sprite = new Sprite(); with(content.graphics) { lineStyle(2, 0xff0000...

JScrollPane now showing its viewport

I am making an application with Java Swing and i have a problem. I have made a Tabbed Panel, which need to hold a simple panel, and a scroll-panel. The simple panel is working fine but in my scroll-panel i can only see the scrollbars, but not the viewport, my code is as follows: ContentPane public class ContentPane extends JTabbedPane ...

How does zooming, panning and rotating work?

Using OpenGL I'm attempting to draw a primitive map of my campus. Can anyone explain to me how panning, zooming and rotating is usually implemented? For example, with panning and zooming, is that simply me adjusting my viewport? So I plot and draw all my lines that compose my map, and then as the user clicks and drags it adjusts my vi...

Does jQuery have any functions to scroll the client to the bottom of the view port?

I want to animate a scroll to the bottom of the viewport with jQuery. Is there a plugin available which isn't overkill (i.e. without a huge feature set for this small task); Is there a plugin available or a way to do this natively with jQuery? ...

Multiple viewports in OpenGL

I need to show the same object in OpenGL in two different viewports, for instance, one using ortographic projection and the other using perspective. In order to do this, do I need to draw again the object after each call to glViewport()? ...

Firefox: Get actual screen location of viewport

Hey all, For firefox is there anyway to determine the TopLeft location of the "viewport" (ie the client area)? I know the height/width is available via window.innerHeight and window.innerWidth. But I also need to know "innerTop" and "innerLeft" (which don't exist). Thanks, Rob ...

Without javascript, can I style a div to cover up the current document including its margins?

it can be done using javascript, but with CSS alone, is it possible to style a div to overlap exactly any page's document content or viewport (to apply an opaque gray layer on the page)? since a page can have margin for it body element, so styling a div to the width of its body element won't do. (needs to work in IE 6 too) ...

Reformatting for landscape view

I load a UIWebView from a string in a navigation based app. I'm using this in a UIWebView's header tag: <meta name="viewport" content="width=320,height=420,user-scalable=yes,initial-scale=1.0"> I use viewport at 1.0 because image sizes don't have to be readjusted, which is the case without viewport. When the phone is rotated to land...

Can you make 3d product models in SilverLight 3?

I've been using ViewPoint to make 3d models for some time, but I'm intrigued with the prospect of moving those models to Silverlight. I have pretty good asp.net experience but have never created a Silverlight App. Are there any good tutorials out there on creating 3d models in Silverlight 3 beta? ...

Loading jQuery Dialog changes Browser viewport Focus

I am loading a jQuery UI window a few scrolls down from the top of the page. When it opens the Browser resets it's position to the top of the page. If it helps just prior to the dialog loading I am inserting some HTML into the page (html for the dialog). Does anyone know how to stop this? Edit The answer on the question guessed what...

Moving Objects in Center-of-Mass Viewport

I'm modeling a force-based physics simulation where several particles are interacting with each other. The particles can move in such a way that a static viewport can easily lose track of them (imagine the whole group of particles moving off the screen to the right and the viewport displaying a blank background). My current solution is...

Adding an Ext.Button class into a Box Component

Hello, I'm working with extjs 2.2.1, having a bit of a trouble adding a button into a box component class. From my understanding, because box component extends the component class, it has no config options that allow an item to be added. So the code below does not work... new Ext.Viewport({ layout : 'border', items : [new Ext.Bo...

How can a URL fragment affect a CSS layout?

Compare these 3 URLs (look at the top navigation bar in each case): http://fast.kirkdesigns.co.uk/blog as above but with the url fragment #navigation as above but with the url fragment #node-2655 Note, that the only difference is the URL fragment on the end. The first two pages display absolutely fine (in Firefox at least). It's the...

How to set viewport meta for iPhone that handles rotation properly?

So I've been using: <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/> to get my HTML content to display nicely on the iPhone. It works great until the user rotates the device into landscape mode, where the display remains constrained to 320px. Is there a simple way to specify a viewport that...

Precise OpacityMask

Suppose I need to set an opacity mask on a WPF control that highlights a portion of it in precise position (suppose a 50x50 square at (50;50) position). To do that I create a DrawingGroup containing 2 GeometryDrawing objects: 1 semi-transparent rectangle for the whole actual size of the control and 1 opaque rectangle for highlighted area...

div positioning based on view port

I would like to position a div relative the the view port of a browser window. Currently I have some popups with some jquery that are dynamically getting positioned based on the window size, however since they are absolute positioned, they are based off the top of the page, so when you scroll down, and click on a project lower on the pag...

Using JavaScript or jQuery to track views of an actual HTML element (vs. just page loads)

My current project requires (if possible) tracking actual views of a JavaScript widget, so that we can compare/control this data against the total number of pageviews reported by our Analytics software (Clicky and/or Google Analytics). Basically, we're selling this widget to a client and want to be able to provide solid metrics to demon...

Reset scale/width/zoom of Safari on iPhone using JavaScript/onorientationchange

I am displaying different content depending on how the user is holding his/her phone using the onorientationchange call in the body tag. This works great - I hide one div while making the other visible. The div in portrait mode looks great on first load. I use this to get the right scale/zoom: <meta name="viewport" content="width=devi...

Is there a way to detect whether Flash is above the browser fold?

I'm looking for a way to determine if a Flash movie is visible within the browser viewport. Unfortunately there's a big caveat here: it must be done without JavaScript. Is there a native method, in Flash or Flex, that can detect when the movie becomes visible? I was thinking that the only way to do it would be some kind of low-level rend...

Full viewport height scaling div just css no js... Possible?

Ok, I'm trying to get a div to scale and the height is always the height of the viewport. I'm going to link to my examples as it needs some explaining. www.madmediablitz.com/tv/precentdemo.html The link above is the closest I've come to a solution and I'm hoping that someone here will find it simple to fix. What I want to happen is the...