Correcting the callback for the script protocol.

In f08119b01e, the default syntax for the script protocol's callback made it so the callbacks looked like `OpenLayers.Protocol.Script.registry[c1]`.  This essentially breaks the script protocol everywhere except where `c1` is defined and equals "c1" (the string).

Tests with this change demonstrate that default callbacks will now look like `OpenLayers.Protocol.Script.registry['c1']` (properly accessing the `c1` property of the registry object).
This commit is contained in:
tschaub
2012-03-20 17:07:52 -06:00
parent 0feefaa4bc
commit 127abf8782
2 changed files with 8 additions and 5 deletions

View File

@@ -57,9 +57,9 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
* APIProperty: callbackTemplate
* {String} Template for creating a unique callback function name
* for the registry. Should include ${id}.
* Default is "OpenLayers.Protocol.Script.registry[${id}]".
* Default is "OpenLayers.Protocol.Script.registry['${id}']".
*/
callbackTemplate: "OpenLayers.Protocol.Script.registry[${id}]",
callbackTemplate: "OpenLayers.Protocol.Script.registry['${id}']",
/**
* APIProperty: callbackKey