|
7 | 7 | * @version 0.0.1 |
8 | 8 | */ |
9 | 9 |
|
| 10 | +// ---------------------------------------- |
| 11 | +// Imports |
| 12 | +// ---------------------------------------- |
| 13 | + |
10 | 14 | import $ from 'jquery'; // for example |
11 | 15 | import 'some-jquery-plugin'; // for example |
12 | 16 | import { WebPluginInterface } from 'web-plugin-interface'; |
13 | 17 |
|
| 18 | +// ---------------------------------------- |
| 19 | +// Exports |
| 20 | +// ---------------------------------------- |
| 21 | + |
14 | 22 | /** |
15 | 23 | * @implements WebPluginInterface |
16 | 24 | */ |
17 | 25 | export class SomeJqueryPluginAbstract extends WebPluginInterface { |
18 | 26 | /** |
19 | 27 | * @param {jQuery} $container |
20 | | - * @param {Object} [customSettings={}] |
21 | | - * @param {Object} [customProps={}] |
| 28 | + * @param {Object} [clientSettings={}] |
| 29 | + * @param {Object} [clientProps={}] |
22 | 30 | */ |
23 | | - constructor ($container, customSettings = {}, customProps = {}) { |
| 31 | + constructor ($container, clientSettings = {}, clientProps = {}) { |
24 | 32 | super(); |
25 | 33 | this.$container = $container; |
26 | | - this.customSettings = customSettings; |
| 34 | + this.clientSettings = clientSettings; |
| 35 | + this.clientProps = clientProps; |
27 | 36 | this.settings = {}; |
28 | 37 | this.props = {}; |
29 | 38 | this.readyCssClass = 'is-ready'; |
@@ -55,8 +64,8 @@ export class SomeJqueryPluginAbstract extends WebPluginInterface { |
55 | 64 | * @protected |
56 | 65 | */ |
57 | 66 | _setup () { |
58 | | - this.props = $.extends({}, this.defaultProps, this.customProps); |
59 | | - this.settings = $.extends({}, this.defaultSettings, this.customSettings); |
| 67 | + this.props = $.extends({}, this.defaultProps, this.clientProps); |
| 68 | + this.settings = $.extends({}, this.defaultSettings, this.clientSettings); |
60 | 69 |
|
61 | 70 | // props example |
62 | 71 | if (this.props.stopAutoPlayIfOutView) { |
@@ -93,9 +102,9 @@ export class SomeJqueryPluginAbstract extends WebPluginInterface { |
93 | 102 | this._afterInitialize(); |
94 | 103 | } |
95 | 104 |
|
96 | | - // ------------------------------ |
| 105 | + // *********************************** |
97 | 106 | // Custom extend implemented interface |
98 | | - // ------------------------------ |
| 107 | + // *********************************** |
99 | 108 |
|
100 | 109 | /** |
101 | 110 | * @type {boolean} |
|
0 commit comments