Commit Graph

149 Commits

Author SHA1 Message Date
crschmidt
5987d5ea33 (continuation of r1359) -- tschaub points out that zoomBox and measureBox
are not the same thing, and also points out that he's already fixed the 
problem in a different and better way. Add in half of his patch, and keep
the other on the back burner until I can review post 2.0 and see how much
of this code needs a rewrite anyway.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1360 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-24 15:20:48 +00:00
crschmidt
b5153746f6 git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1359 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf 2006-08-24 15:19:18 +00:00
crschmidt
fb663b5127 If we turn on the zooming tool, then click on the panzoombar in IE,
because the click drops through (Why god Why?!) we get an error telling
us that evt.xy doesn't exist, so we wrap it in an if statement which
protects us. (Deliver us, o if statement, from IEvil...) 


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1358 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-24 15:07:18 +00:00
crschmidt
1f9cb14069 When you click and don't drag, we zoom in, but we want to set performedDrag,
since that's how we ensure that we don't fire click.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1357 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-24 14:52:39 +00:00
crschmidt
6fe0826a54 Change zoomBox function to be a 'zoom in' if the user draws a very small box.
In order to remove duplicate code, make MouseToolbar a subclass of 
MouseDefaults, and create zoomBoxEnd method. 


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1356 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-24 14:21:45 +00:00
crschmidt
5320cd290c Dragging stopped by Event.stop call when it shouldn't have been -- no
need for this. Only stop event if mousedown started in zoombar. 


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1353 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-24 05:59:12 +00:00
crschmidt
a50b175b66 Because we've removed the ruler button, its image no longer needs changing
when we change modes to/from that mode. Remember that.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1352 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-24 05:49:02 +00:00
crschmidt
739b821570 console.log is NOT VALID JAVASCRIPT. Soon I will need to just create a wrapper
function which does nothing, if I keep up these crappy commits.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1350 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-24 05:19:20 +00:00
crschmidt
eb783aab37 If we choose to switch to a mode via the toolbar, don't leave that mode
until we're explicitly told to. This allows users to click the zoombox
and zoom several times.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1347 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-24 05:01:10 +00:00
crschmidt
a7da80c24b Until we have line drawing, there's no need for ruler-ing. It's confusing
users. 


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1339 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-23 20:39:22 +00:00
crschmidt
00dfc669d2 If we're zooming with this tool, we only want to actually change the zoom if
the box was bigger than 5px in one direction or another. If it was smaller 
than that, the user probably just clicked, rather than drawing a box, because 
the MouseToolbar icon is kind of misleading.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1338 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-23 20:37:16 +00:00
crschmidt
a6ff5584ad In order to set the status of an element before it's added ot the DOM in IE,
you have to use "defaultChecked" rather than "checked". So, we'll set both --
one for IE, one for Firefox -- and call it done.

I want the last three days of my life back.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1330 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-22 14:23:23 +00:00
crschmidt
402021f24f If a mouseup is not preceeded by a mousedown *inside the layerswitcher*,
then the mouseup should be allowed to drop through to the map, since it
may have started as part of a drag action.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1329 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-22 13:09:53 +00:00
crschmidt
44819f20e8 unregister allows you to specify a function. remove does not.
I can't believe no one caught this before... (Fixes #192.)


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1319 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-21 19:18:47 +00:00
crschmidt
4847d66d6a Post-drag 'click' events aren't really clicks. Don't let them fall through to
the map.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1316 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-19 15:57:14 +00:00
crschmidt
c4541115f9 Stop click events from falling through to the map.
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1315 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-19 15:03:45 +00:00
crschmidt
d500981f09 Let's trap all these events. Tested by bitner on IRC in IE (thanks!) and works
in FF on Mac. Hopefully this works! this is my major blocker for RC2, a 
few more minor changes and i'll kick it out.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1314 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-19 15:01:58 +00:00
euzuro
cd21f42dab put zoombar slider at the correct zoom level on first draw (not just always at the end)
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1306 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-19 05:00:54 +00:00
euzuro
1459ac5de9 real fix for #189 -- event wasnt being triggered, and wihtout the clone(), control was floating down the div
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1305 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-19 04:47:12 +00:00
euzuro
cfd7858861 remove extraneous comment
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1303 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-19 03:43:35 +00:00
euzuro
17581c714d Remove the concept of min/max zoom level from Map. Replace it with concept of num zoom levels. Bit of rearrangement in the initResolutions() function in HTTPRequest.js. Adapt all of OL to deal with numZoomLevels instead of min/max. Fix PanZoomBar so that it listens for change of baselayer and redraws itself. fix all tests so they pass. Add zoomLevels.html example for playing around with different methods of setting zoomlevels.
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1302 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-19 02:09:29 +00:00
euzuro
f98ac685d1 kill the double-click event after we have dealt with it
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1248 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-16 17:34:39 +00:00
euzuro
c2355d207c make sure scroll only scrolls if it was done over the map, and also stop event propagation so that the window doesnt scroll too
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1246 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-16 17:24:55 +00:00
crschmidt
2e3ff459b2 Change Scale control to use getScale() from map.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1245 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-16 17:19:28 +00:00
euzuro
f5ee80907c use default wheel functions that i created earlier
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1241 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-16 16:53:41 +00:00
euzuro
3faa7460ff scrolling with mousewheel triggers zooming.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1215 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-15 12:50:42 +00:00
euzuro
c1b8c8dd60 change the '@require:' to '@requires' so as to be compatible with JSDOC standards. put these directly inside the class definition comment block. update script to suggest this and update all source files to follow pattern. Caught a missing @requires in the EventPane.js file
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1206 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-14 23:05:05 +00:00
euzuro
b2ab65df12 fixing bug introduced with r1134
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1172 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 20:10:10 +00:00
Schuyler Erle
3f5c2a8fb9 Moved INCHES_PER_UNIT and DOTS_PER_INCH into Util.js.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1159 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 14:47:26 +00:00
euzuro
0332bd09ec event -> Event
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1142 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 04:21:29 +00:00
crschmidt
0ba7961df4 Commit tile-reuse branch back to trunk. This branch offers numerous performance
improvements in the form of reduced memory use and lower element creating costs,
hopefully making the OpenLayers code more usable in internet explorer as well
as less of a memory hog in Firefox and other browsers. Additionally, a buffer
is available around the main map grid which allows tiles to be loaded outside
of the viewing area for faster dragging.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1137 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 03:47:33 +00:00
euzuro
51ac2b4acf remove useless or duplicate functions from Util.js -- no more: Array prepend() append() -- use push() and unshift(). clear() and indexOf() both removed as they are duplicated in Prototype.js -- all instances replaced and tests updated.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1136 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 03:31:06 +00:00
euzuro
f2a3cf9348 don't allow a baselayer to unselect itself
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1134 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 03:10:57 +00:00
euzuro
864e54b8e7 if there are no overlays then don't display the overlay label
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1116 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-08 22:02:28 +00:00
euzuro
f3a072b151 new layerswitcher, improved google layer, boxes layer, grid fix
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1096 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-08 18:20:24 +00:00
euzuro
620cebb79c add a 'changelayer' event that fires when a layer's visibility changes. listen for this in the layerswitcher
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1050 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-02 16:08:09 +00:00
euzuro
88e1b772b9 only call the concluding setCenter() (which generally will do no more than fire the 'moveend' event) if the drag was actually performed. otherwise, it was just a click, and no need.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1012 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-26 15:33:12 +00:00
euzuro
a171ae13b6 fixing more tabs. all tests pass
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1011 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-26 14:44:44 +00:00
crschmidt
692d0f6113 Fix broken units: inches was missing, and dd was in place of images.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@966 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-18 14:37:40 +00:00
euzuro
e91d0546ee replace all usage of copyOf() with clone(). Now copyOf() is officially deprecated and unused. supported only if users out there have used it, but we can phase it out in the next official release.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@961 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-18 11:56:13 +00:00
crschmidt
37e47ad612 Added rounding in updateScale().
git-svn-id: http://svn.openlayers.org/trunk/openlayers@925 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-08 06:35:47 +00:00
crschmidt
3d59c93b9d Removed unnecessary base param from Scale control.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@924 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-08 06:20:36 +00:00
Schuyler Erle
70df45d160 Created scale indicator based on Chris's Permalink.js.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@923 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-08 06:17:33 +00:00
Schuyler Erle
3a018dbb45 Declared vars in Permalink.js as lexical.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@922 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-08 06:05:48 +00:00
euzuro
10cbef9274 since we can technically register events for any domelement, there is no reason this variable should be named 'div'. Change it to 'element' and update its use everywhere.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@866 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-04 11:57:18 +00:00
euzuro
af5e930c0a coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@856 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-03 00:15:42 +00:00
euzuro
e34d5e2e96 jsdoc
git-svn-id: http://svn.openlayers.org/trunk/openlayers@855 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-03 00:06:28 +00:00
euzuro
16d9da1268 coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@853 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-02 18:49:07 +00:00
euzuro
70af5bbb7f jsdoc
git-svn-id: http://svn.openlayers.org/trunk/openlayers@852 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-02 18:43:50 +00:00
crschmidt
50c00d35d9 Fix a lint error in Javascript, thanks to Safari. (Found by a user of the Boston Freemap.)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@850 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-01 19:36:42 +00:00