coupdoeil
Version:
Javascript for Ruby on Rails Coupdoeil gem
21 lines (15 loc) • 351 B
JavaScript
export class PopoverController {
constructor(coupdoeilElement) {
this.coupdoeilElement = coupdoeilElement
this.card = null
this.children = new Set()
this.parent = null
this.closingRequest = null
}
get isOpen() {
return !!this.coupdoeilElement.dataset.popoverOpen
}
get isClosed() {
return !this.isOpen
}
}