imitate browser zoom with JavaScript

There you go: Use: document.body.style.zoom=1.0;this.blur(); 1.0 means 100% 150% would be 1.5 1000% would be 10.0 this.blur() means that the curser, maybe you selected an input field, looses focus of every select item. or: You can use the css3 element zoom (Source) Firefox does not allow zooming with the browser because you can’t access the … Read more

Zoomable, Google-Finance-style time series graph in D3 or Rickshaw? [closed]

NVD3 is a very cool project that has a number of reusable charts written upon D3. See here for an example of a line chart with a view finder, along with source code. Update: The NVD3 example now also links to an example of Mike Bostock’s (creator of D3) which demonstrates similar functionality, the ability … Read more

Move camera to fit 3D scene

There are many possible camera positions + orientations where the bounding box would fit inside the view frustum. But any procedure would select one specific camera position and orientation. If you would consider bounding spheres, one solution could be to first change orientation to look at bounding sphere center then move back sufficiently (negative look … Read more

markerClusterer on click zoom

There has been an update to the MarkerClusterer source code, allowing much easier access to the click event: google.maps.event.addListener(markerCluster, ‘clusterclick’, function(cluster) { // your code here }); where ‘markerCluster’ ist the MarkerCluster object. Inside the function you may also access cluster.getCenter(); cluster.getMarkers(); cluster.getSize(); I use this to switch to a different map type, as I … Read more

How to zoom whole activity on multi touch?

You can simulate zooming in and out by scaling the root activity view. Here’s some starter code: View v = findViewById(android.R.id.content); // get reference to root activity view v.setOnClickListener(new OnClickListener() { float zoomFactor = 1.5f; boolean zoomedOut = false; @Override public void onClick(View v) { if(zoomedOut) { // now zoom in v.setScaleX(1); v.setScaleY(1); zoomedOut = … Read more