#823 New class style. Instead of OldStyle = Class.create(); OldStyle.prototype = Class.inherit(Parent, prototype), we now use NewStyle = OpenLayers.Class(Parent, prototype). New style classes allow for backwards compatibility [you can use OldStyle = Class.create(); Class.inherit(NewStyle, prototype)]. The Class.create and Class.inherit functions are deprecated. Backwards compatibility will be removed at 3.0. Thanks Erik for the careful review.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3767 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Handler>
|
||||
*/
|
||||
OpenLayers.Handler.Box = OpenLayers.Class.create();
|
||||
OpenLayers.Handler.Box.prototype = OpenLayers.Class.inherit( OpenLayers.Handler, {
|
||||
OpenLayers.Handler.Box = OpenLayers.Class(OpenLayers.Handler, {
|
||||
|
||||
/**
|
||||
* Property: dragHandler
|
||||
* {<OpenLayers.Handler.Drag>}
|
||||
|
||||
@@ -23,9 +23,7 @@
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Handler>
|
||||
*/
|
||||
OpenLayers.Handler.Drag = OpenLayers.Class.create();
|
||||
OpenLayers.Handler.Drag.prototype =
|
||||
OpenLayers.Class.inherit( OpenLayers.Handler, {
|
||||
OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
|
||||
|
||||
/**
|
||||
* Property: started
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
* Callbacks will be called for over, move, out, up, and down (corresponding
|
||||
* to the equivalent mouse events).
|
||||
*/
|
||||
OpenLayers.Handler.Feature = OpenLayers.Class.create();
|
||||
OpenLayers.Handler.Feature.prototype =
|
||||
OpenLayers.Class.inherit(OpenLayers.Handler, {
|
||||
OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, {
|
||||
|
||||
/**
|
||||
* Property: layerIndex
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Handler>
|
||||
*/
|
||||
OpenLayers.Handler.Keyboard = OpenLayers.Class.create();
|
||||
OpenLayers.Handler.Keyboard.prototype = OpenLayers.Class.inherit( OpenLayers.Handler, {
|
||||
OpenLayers.Handler.Keyboard = OpenLayers.Class(OpenLayers.Handler, {
|
||||
|
||||
/* http://www.quirksmode.org/js/keys.html explains key x-browser
|
||||
key handling quirks in pretty nice detail */
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Handler>
|
||||
*/
|
||||
OpenLayers.Handler.MouseWheel = OpenLayers.Class.create();
|
||||
OpenLayers.Handler.MouseWheel.prototype = OpenLayers.Class.inherit( OpenLayers.Handler, {
|
||||
OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, {
|
||||
/**
|
||||
* Property: wheelListener
|
||||
* {function}
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Handler.Point>
|
||||
*/
|
||||
OpenLayers.Handler.Path = OpenLayers.Class.create();
|
||||
OpenLayers.Handler.Path.prototype =
|
||||
OpenLayers.Class.inherit(OpenLayers.Handler.Point, {
|
||||
OpenLayers.Handler.Path = OpenLayers.Class(OpenLayers.Handler.Point, {
|
||||
|
||||
/**
|
||||
* Property: line
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Handler>
|
||||
*/
|
||||
OpenLayers.Handler.Point = OpenLayers.Class.create();
|
||||
OpenLayers.Handler.Point.prototype =
|
||||
OpenLayers.Class.inherit(OpenLayers.Handler, {
|
||||
OpenLayers.Handler.Point = OpenLayers.Class(OpenLayers.Handler, {
|
||||
|
||||
/**
|
||||
* Property: point
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
* - <OpenLayers.Handler.Path>
|
||||
* - <OpenLayers.Handler>
|
||||
*/
|
||||
OpenLayers.Handler.Polygon = OpenLayers.Class.create();
|
||||
OpenLayers.Handler.Polygon.prototype =
|
||||
OpenLayers.Class.inherit(OpenLayers.Handler.Path, {
|
||||
OpenLayers.Handler.Polygon = OpenLayers.Class(OpenLayers.Handler.Path, {
|
||||
|
||||
/**
|
||||
* Parameter: polygon
|
||||
|
||||
Reference in New Issue
Block a user