-
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#6235 main.addon.ScrollSync: base class
- Loading branch information
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import Base from './Base.mjs'; | ||
|
||
/** | ||
* Syncs the scroll state of 2 DOM nodes | ||
* @class Neo.main.addon.ScrollSync | ||
* @extends Neo.main.addon.Base | ||
*/ | ||
class ScrollSync extends Base { | ||
static config = { | ||
/** | ||
* @member {String} className='Neo.main.addon.ScrollSync' | ||
* @protected | ||
*/ | ||
className: 'Neo.main.addon.ScrollSync', | ||
/** | ||
* Remote method access for other workers | ||
* @member {Object} remote | ||
* @protected | ||
*/ | ||
remote: { | ||
app: [ | ||
'register', | ||
'unregister' | ||
] | ||
} | ||
} | ||
|
||
/** | ||
* @param {Object} data | ||
*/ | ||
register(data) { | ||
console.log('register', data) | ||
} | ||
|
||
/** | ||
* @param {Object} data | ||
*/ | ||
unregister(data) { | ||
console.log('unregister', data) | ||
} | ||
} | ||
|
||
export default Neo.setupClass(ScrollSync); |