|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
838 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | const Mixin = require('../../utils/mixin');
|
|---|
| 4 |
|
|---|
| 5 | class LocationInfoOpenElementStackMixin extends Mixin {
|
|---|
| 6 | constructor(stack, opts) {
|
|---|
| 7 | super(stack);
|
|---|
| 8 |
|
|---|
| 9 | this.onItemPop = opts.onItemPop;
|
|---|
| 10 | }
|
|---|
| 11 |
|
|---|
| 12 | _getOverriddenMethods(mxn, orig) {
|
|---|
| 13 | return {
|
|---|
| 14 | pop() {
|
|---|
| 15 | mxn.onItemPop(this.current);
|
|---|
| 16 | orig.pop.call(this);
|
|---|
| 17 | },
|
|---|
| 18 |
|
|---|
| 19 | popAllUpToHtmlElement() {
|
|---|
| 20 | for (let i = this.stackTop; i > 0; i--) {
|
|---|
| 21 | mxn.onItemPop(this.items[i]);
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | orig.popAllUpToHtmlElement.call(this);
|
|---|
| 25 | },
|
|---|
| 26 |
|
|---|
| 27 | remove(element) {
|
|---|
| 28 | mxn.onItemPop(this.current);
|
|---|
| 29 | orig.remove.call(this, element);
|
|---|
| 30 | }
|
|---|
| 31 | };
|
|---|
| 32 | }
|
|---|
| 33 | }
|
|---|
| 34 |
|
|---|
| 35 | module.exports = LocationInfoOpenElementStackMixin;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.