Closed (fixed)
Project:
Openlayers
Version:
6.x-2.x-dev
Component:
OpenLayers Behaviors
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
27 Sep 2009 at 20:58 UTC
Updated:
29 Jan 2010 at 17:34 UTC
Starting new ticket. The new behaviors system uses a CTools plugin with context, meaning that the plugin changes based on "context" of where it is being used (see CTools plugin example module and help).
Comments
Comment #1
zzolo commentedNotes
* See openlayers_openlayers_behaviors() to see how we are defining behaviors.
* We should discuss what behaviors need to be part of core module and in behaviors modules
* Check names of behaviors
* Core changes and copying core behaviors from 0.x version: http://drupal.org/cvs?commit=268234
Comment #2
zzolo commented* Looking at all these behaviors. Something to note: They all pretty much include a JS file. All we have to do is standardize where these js files are include automatically.
* Overview Map in core plugin class was not named correctly (and does not work)
* DOCUMENTATION! (basic documentation is missing, added some)
* Removed old behavior good from openlayers.js
* Updated and added some maps to the the test module for testing
* Changed default map preset to use the new behaviors
* Technically the Controls array still works
* I don't relly like this naming convention, but a lot of work to change: $(this).data('openlayers', {'map': map, 'openlayers': openlayers});
* Behaviors JS should check that the behaviors exists before checking for array. See #589642: 2.x: The Behaviors JS Functiosn provided by 0.x Do Not Check BEhaviors Correctly
* Behaviors in openlayers_behaviors need to be looked at in more detail
TODO:
* Test and review
* Move over the behaviors in openlayers_behavior. I copied over the ones in the 0.x branch and these should work, but there is definitely need to review and look at the ones that the 0.x did not address. I'm gonna make this another ticket, since the architecture has changed.
http://drupal.org/cvs?commit=268300
Comment #3
zzolo commentedAlso, need to make the switch on the UI. Shoud move layers to ctools first and do the big push on the UI together
Comment #4
zzolo commentedNeed to address UI, will do after layers have been moved to ctools.
Comment #5
zzolo commentedAlso need to address CCK and Views that use behaviors.
Comment #6
tmcw commentedRe: automatically including javascript files with behaviors, I am opposed because in many cases it makes sense to include multiple javascript files; the most common case is that a behavior will include the javascript file for an OpenLayers standard control or a custom control like LayerSwitcherPlus, and then a simple javascript file that encapsulates that control in a drupal behavior fashion. Merging the two files would be bad architecture. Also, moving all controls and their javascript into behaviors could be a very good idea because it reduces the size of the openlayers library in a natural way.
Comment #7
zzolo commentedInital UI Switch: #589670: 2.x: Update UI Module to Reflect Architectural Changes
Comment #8
tmcw commentedThis was completed long ago; let's open tickets for more specific issues.
Comment #9
tmcw commented