You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+72-56Lines changed: 72 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,13 +20,13 @@ Below is a list of these methods and properties. Then you can see [an example im
20
20
---
21
21
22
22
-[`constructor()`](#constructor)
23
+
-[`defaults`](#defaults)
24
+
-[`defaultSettings`](#defaultsettings)
25
+
-[`defaultProps`](#defaultprops)
23
26
-[`_setup()`](#_setup)
24
27
-[`_beforeInitialize()`](#_beforeinitialize)
25
28
-[`_afterInitialize()`](#_afterinitialize)
26
29
-[`initialize()`](#initialize)
27
-
-[`defaults`](#defaults)
28
-
-[`defaultSettings`](#defaultsettings)
29
-
-[`defaultProps`](#defaultprops)
30
30
31
31
32
32
### `constructor()`
@@ -35,6 +35,25 @@ Here we describe the future instances.:
35
35
- get data from arguments
36
36
- declare instance properties
37
37
38
+
### `defaults`
39
+
40
+
> since v3.0.0 property renamed to `defaultSettings`
41
+
42
+
### `defaultSettings`
43
+
44
+
_`public`_
45
+
_**`since v3.0.0`**_
46
+
47
+
A getter that returns an object with default options, settings, or configuration for your plugin.
48
+
49
+
### `defaultProps`
50
+
51
+
_`public`_
52
+
_**`since v3.0.0`**_
53
+
54
+
A getter that returns an object with predefined props.
55
+
Most often this is a list of options that are not included in the list of certain options of your plugin. But you need them for individual processing your options, settings, data, etc.
56
+
38
57
39
58
### `_setup()`
40
59
@@ -63,25 +82,6 @@ _`public`_
63
82
64
83
Directly launch your plugin.
65
84
66
-
### `defaults`
67
-
68
-
> since v3.0.0 property renamed to `defaultSettings`
69
-
70
-
### `defaultSettings`
71
-
72
-
_`public`_
73
-
_**`since v3.0.0`**_
74
-
75
-
A getter that returns an object with default options, settings, or configuration for your plugin.
76
-
77
-
### `defaultProps`
78
-
79
-
_`public`_
80
-
_**`since v3.0.0`**_
81
-
82
-
A getter that returns an object with predefined props.
83
-
Most often this is a list of options that are not included in the list of certain options of your plugin. But you need them for individual processing your options, settings, data, etc.
84
-
85
85
---
86
86
87
87
## Usage example
@@ -113,70 +113,86 @@ export class SomeJqueryPluginAbstract extends WebPluginInterface {
113
113
this.readyCssClass='is-ready';
114
114
this.initializedCssClass='is-initialized';
115
115
}
116
+
117
+
/**
118
+
* @type{Object}
119
+
*/
120
+
getdefaultSettings () {
121
+
return {
122
+
// an example of some options of your plugin
123
+
autoplay:true,
124
+
speed:500
125
+
}
126
+
}
116
127
117
-
/**@protected*/
128
+
/**
129
+
* @type{Object}
130
+
*/
131
+
getdefaultProps () {
132
+
return {
133
+
// an example of options that is native for your plugin
0 commit comments