Prettified all files.
This commit is contained in:
+13
-14
@@ -2,9 +2,8 @@
|
||||
* shown.
|
||||
*/
|
||||
export default class Poppable {
|
||||
|
||||
/** Register the poppable element in a context. Closes previously registered ones.
|
||||
* @param {*} context
|
||||
* @param {*} context
|
||||
*/
|
||||
register(context) {
|
||||
let registered = Poppable.get(context)
|
||||
@@ -16,7 +15,7 @@ export default class Poppable {
|
||||
|
||||
/**
|
||||
* Unregister object from context
|
||||
* @param {*} context
|
||||
* @param {*} context
|
||||
*/
|
||||
unregister(context) {
|
||||
Poppable.delete(context)
|
||||
@@ -33,20 +32,20 @@ export default class Poppable {
|
||||
return Poppable.registrations.get(context)
|
||||
}
|
||||
|
||||
/** Sets the poppable in the given context
|
||||
* @static
|
||||
* @param {*} context
|
||||
* @param {*} poppable
|
||||
* @returns
|
||||
* @memberof Poppable
|
||||
*/
|
||||
/** Sets the poppable in the given context
|
||||
* @static
|
||||
* @param {*} context
|
||||
* @param {*} poppable
|
||||
* @returns
|
||||
* @memberof Poppable
|
||||
*/
|
||||
static set(context, poppable) {
|
||||
return Poppable.registrations.set(context, poppable)
|
||||
}
|
||||
|
||||
/** Test whether a poppable exists in the given context
|
||||
*
|
||||
* @param {*} context
|
||||
*
|
||||
* @param {*} context
|
||||
*/
|
||||
static has(context) {
|
||||
return Poppable.registrations.has(context)
|
||||
@@ -65,8 +64,8 @@ export default class Poppable {
|
||||
|
||||
/** All poppable must implement a close method. */
|
||||
close() {
|
||||
console.error("Must be implemented")
|
||||
console.error('Must be implemented')
|
||||
}
|
||||
}
|
||||
|
||||
Poppable.registrations = new Map()
|
||||
Poppable.registrations = new Map()
|
||||
|
||||
Reference in New Issue
Block a user