mirror of
https://github.com/Shopify/draggable.git
synced 2025-12-08 20:15:56 +00:00
31 lines
573 B
TypeScript
31 lines
573 B
TypeScript
/**
|
|
* All draggable plugins inherit from this class.
|
|
* @abstract
|
|
* @class AbstractPlugin
|
|
* @module AbstractPlugin
|
|
*/
|
|
export abstract class AbstractPlugin {
|
|
/**
|
|
* AbstractPlugin constructor.
|
|
* @constructs AbstractPlugin
|
|
* @param {Draggable} draggable - Draggable instance
|
|
*/
|
|
constructor(protected draggable: any) {}
|
|
|
|
/**
|
|
* Override to add listeners
|
|
* @abstract
|
|
*/
|
|
attach() {
|
|
throw new Error('Not Implemented');
|
|
}
|
|
|
|
/**
|
|
* Override to remove listeners
|
|
* @abstract
|
|
*/
|
|
detach() {
|
|
throw new Error('Not Implemented');
|
|
}
|
|
}
|