From e1e456b975768f0f6c3d80984ca3e53cd6424348 Mon Sep 17 00:00:00 2001 From: Machiste Quintana Date: Wed, 12 Nov 2014 15:15:56 -0500 Subject: [PATCH] simplify initialize clarification --- reference.html | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/reference.html b/reference.html index f8bf030c..ecb64af2 100644 --- a/reference.html +++ b/reference.html @@ -5017,18 +5017,7 @@ var a = new MyClass("Hello"); a.greet("World"); - -

Class Constructors

- -

Class constructors can be created by assigning a constructor function to the initialize key:

- -
var MyClass = L.Class.extend({
-	initialize: function (greeter) {
-		this.greeter = greeter;
-		// class constructor
-});
- -

Please note that if you assign a new initialize method, it overwrites its parent initialize method.

+

The initialize method is your class's constructor function, meaning that it gets called when you do new MyClass(...).

Class Factories