Commit Graph

60 Commits

Author SHA1 Message Date
euzuro
542e9fa258 allow for user to set the sizing method. make default 'scale'. set to 'crop' as desired for panzoombar in r396. removed outdated tests
git-svn-id: http://svn.openlayers.org/trunk/openlayers@401 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-26 15:47:07 +00:00
crschmidt
db6049d3b4 * Refactor PanZooMBar so that we don't have three functions that do the exact same thing: These are simply passing information on to the slider, which then actually does the moving, so we'll create passToSlider.
* Alter the dragging code so that you can't drag above or below the top/bottom of the bar.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@397 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-26 12:16:02 +00:00
crschmidt
1f89f13fb5 Adding events to map while dragging in the zoombar, then removing them afterwards. This neccessitated adding a 'remove' to Events, to pop events off the end. No more problems with dragging off into the map accidentally.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@388 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-26 02:17:43 +00:00
crschmidt
ae5ff749da Add missing Event.stop() on slider div move event.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@387 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-26 02:00:54 +00:00
euzuro
e54c008a98 more updates i missed in r384
git-svn-id: http://svn.openlayers.org/trunk/openlayers@385 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-26 01:42:32 +00:00
euzuro
f115b797a3 Changed around the order of arguments for createImage, createDiv, and createAlphaImage. bubbled out helper function OpenLayers.Util.modifyDOMElement() to handle common mods. Official order now is: id, px, sz, imgURL, position, border[, overflow]
git-svn-id: http://svn.openlayers.org/trunk/openlayers@384 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-26 01:23:11 +00:00
crschmidt
dccc884faa Fix a swap Pixel->Size from r363
git-svn-id: http://svn.openlayers.org/trunk/openlayers@380 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-26 00:00:42 +00:00
crschmidt
d7a27bc959 Changing the IE Specific code. We create a regular alphaImageDiv, then resize it after we get it back. Hopefully this makes IE less cranky.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@379 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-25 23:45:25 +00:00
crschmidt
5f4a8d2b0d Make a first attempt at making the zoombar div transparency work in IE. Since this image is a background image, I want to be able to set different sizes for the img and the div. I'm nt sure how well this attempt will work. However, the code still works in FF on OS X. Someone with IE test when they get a bit?
git-svn-id: http://svn.openlayers.org/trunk/openlayers@374 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-25 19:46:49 +00:00
crschmidt
c8ed8cee87 Fix click-to-zoom.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@373 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-25 18:39:15 +00:00
euzuro
af4028879f fix to PanZoom controls to make them alpha-clear. This is it for #25
git-svn-id: http://svn.openlayers.org/trunk/openlayers@363 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-25 16:38:07 +00:00
crschmidt
44454ba193 Implement radio button support in LayerSwitcher. Pass in {mode:'radio'} to constructor to switch away from checkbox mode, which is default. This allows us to complete the original part of #32, although we do not yet support the concept of 'base layers' described in that ticket, which has been split to #62.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@361 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-25 15:29:53 +00:00
euzuro
06cbeb2f11 fix for #60
conversions to/from lonlat/px need to take into account
the offset of the layersContainerDiv. 


I have introduced the following functions for converting
between layer and screen pixel values:

getLayerPxFromScreenPx() and getScreenPxFromLayerPx()

they are pretty self-explanitory.


I then renamed:

getPixelFromLonLat() and getLonLatFromPixel()

to:

getScreenPxFromLonLat() and getLonLatFroScreenmPx()

and added:

getLayerPxFromLonLat() and getLonLatFromLayerPx()


updates were made throughout the code, demos, and tests
so everything should still run smoothly.

-e-

git-svn-id: http://svn.openlayers.org/trunk/openlayers@329 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 18:45:50 +00:00
crschmidt
e5bb6b7dbd Finish of r326, adding : to @require pragmas
git-svn-id: http://svn.openlayers.org/trunk/openlayers@328 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 17:39:21 +00:00
crschmidt
213a1b02d1 A couple changes got rolled into r326 that weren't meant to: Rolling them back out.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@327 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 17:38:27 +00:00
crschmidt
c0ec7f9a00 Change @require to @require:
git-svn-id: http://svn.openlayers.org/trunk/openlayers@326 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 17:17:22 +00:00
crschmidt
201e478c63 Complete refactoring of PanZoomBar. This changes all event handling to be through the Events class, which wasn't the case in the past: this has the result of changing the 'this' object from being the slider, div, etc. to being the Control itself, which simplifies much of the code, and probably removes a few circular references.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@323 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 13:44:29 +00:00
Schuyler Erle
7683e0853a Fix to Control.MouseDefaults stops panning when dragging off the map. Closes #29 for good, I hope.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@308 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 03:20:22 +00:00
Schuyler Erle
a317e767ec Some improvements to Control.PanZoomBar, mostly to make it work with the new graphics.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@281 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-23 15:39:07 +00:00
crschmidt
9190dd18d2 Add @require pragma to all source files.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@277 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-23 15:20:31 +00:00
crschmidt
81c9315c17 Finishing Schuyler's commit the other day, which was designed to change behavior on release of shift key, but failed to actually do so...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@276 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-23 14:45:51 +00:00
euzuro
cd677b332d small modification to r269 - making sure these get set in the instances and not the class (static).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@272 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 18:11:49 +00:00
Schuyler Erle
7378388d45 Added a position property to Control, which allows us to specify a default
location for each Control class, and saves us from *having* to supply a pixel
position to the map.addControl() method -- the sensible default will tend to be
used instead.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@269 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 17:25:46 +00:00
euzuro
f5b1cc270c fixing tabs
git-svn-id: http://svn.openlayers.org/trunk/openlayers@256 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 13:05:14 +00:00
euzuro
08e7a5f10f update Control, Marker, and Popup such that they all have draw(px) and move(px) functions. standardization. update tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@255 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 12:50:09 +00:00
euzuro
9fd1d458ae coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@254 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 12:36:14 +00:00
Schuyler Erle
af7dc7661a Commented out code to cancel zoom box if shift key is released before left mouse button. I find myself doing this consistently by accident, so we should probably find another way to cancel the zoom, like hittin ESC or something.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@245 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 03:47:19 +00:00
Schuyler Erle
7999253c74 Make the zoom box thicker and semi-opaque.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@244 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 03:27:51 +00:00
euzuro
2e4f6129f6 forgot that these declarations are still only statically initialized. even though the chance of somebody *modifying* one of these strings (rather than just replacing it) is rather low... we might as well do things the right way
git-svn-id: http://svn.openlayers.org/trunk/openlayers@228 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 16:02:29 +00:00
crschmidt
e97ccc7dd4 Missed a switch from this.map -> this on mouseDefaults. Dragging was
broken.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@219 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 03:12:53 +00:00
crschmidt
d0da958e57 1. Change the calling syntax for events on this control so that they go
from this instead of this.map. This has practical as well as idealogical 
benefits, namely that we can now call other methods on the control from 
within a control. This is neccesary for...
2. When the shift key is lifted, stop the zoomBox. This is the way in 
which users can *not* zoom once they've started.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@217 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 00:35:04 +00:00
crschmidt
24eb8fe144 Implement Drag-to-Zoom for ticket #30.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@216 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 22:18:44 +00:00
crschmidt
334fb4c2ed Add start of a KeyboardDefaults class. This works, but because Keyboard events apparently always happen on the document level, I haven't yet figured out how to have them only happen when you're 'focused' on the map, so these are currently off by default. To test them, map.addControl(new OpenLayers.Control.KeyboardDefaults()); in your HTML file.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@214 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 19:59:50 +00:00
crschmidt
563b828ede Migrate Map MouseControls to MouseDefaults.js. This moves event handling into a control, where we can modify it and edit it without mucking about in the main map class, bringing this portion of the code more into line with the way other aspects of the controls situation work.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@204 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 02:29:39 +00:00
crschmidt
8539ce0a71 Remove old comments.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@202 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 02:19:08 +00:00
euzuro
b4f80c494c added member variables for activeColor and nonActiveColor so that users can customize dynamically
git-svn-id: http://svn.openlayers.org/trunk/openlayers@132 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 06:06:16 +00:00
euzuro
9235f04cce properly declare CLASS_NAME member as constant. Also, add <i> tags around examples in comments
git-svn-id: http://svn.openlayers.org/trunk/openlayers@105 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 17:11:32 +00:00
euzuro
6f242f5746 Replace all instances and usages of LatLon to LonLat
git-svn-id: http://svn.openlayers.org/trunk/openlayers@99 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 15:51:37 +00:00
crschmidt
8a5842a11c Add Height/Width to control div via Map.js -- this is good for when elements inside the div are absolutely positioned, and therefore have no width.
The LayerSwitcher now sets right, and *unsets* left. This is important because otherwise browsers get confused.



git-svn-id: http://svn.openlayers.org/trunk/openlayers@93 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 14:03:33 +00:00
euzuro
605ba7a066 bring in code from old switcher.js to make the switcher tabs prettier. unfortunately, they refuse to right-align. If i wasnt as cracked-out as I am right now, i would continue plugging away. As it is, however, my faculties are waning. Off to bed.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@86 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 04:35:14 +00:00
euzuro
401aa4d69a decomposed layerswitcher
git-svn-id: http://svn.openlayers.org/trunk/openlayers@84 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 03:39:39 +00:00
crschmidt
3dca1fffb6 PanZoomBar is now a subclass of PanZoom, and can drop a lot of its functions in favor of inheriting from that class. hooray for less code duplication.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@83 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 03:36:11 +00:00
crschmidt
ebcebe6ef7 Add code to capture 'clicks' on the zoombar, and deliver the zoom to that level. This matches the Google Maps expectation of being able to click on a 'rung' and zoom in to that level.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@82 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 03:17:55 +00:00
euzuro
9def710214 always delete everything and rebuild everything on redraw(). Just simpler this way
git-svn-id: http://svn.openlayers.org/trunk/openlayers@81 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 03:13:41 +00:00
euzuro
ca0a8407b4 move the append up into the loop, so as not to repeatedly append extant divs
git-svn-id: http://svn.openlayers.org/trunk/openlayers@80 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 02:59:37 +00:00
euzuro
b0020d6f40 push constant variables out of the class, make them static. other small coding standards changes.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@79 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 02:52:57 +00:00
crschmidt
90460002cb Register 'zoomend' event. Use zoomend event registration to move zoomer when zoom level changes. And it even works right.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@78 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 02:48:18 +00:00
euzuro
e5914e6c50 add constants for active/deactive switcher controls
git-svn-id: http://svn.openlayers.org/trunk/openlayers@75 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 02:16:57 +00:00
euzuro
d260d7c3ae JSDOC, coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@74 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 02:08:21 +00:00
crschmidt
e77be72a77 This was named the same as PanZoom, and was overriding this class when included.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@71 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 01:49:19 +00:00