Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

open-element-stack-mixin.js 838B

1234567891011121314151617181920212223242526272829303132333435
  1. 'use strict';
  2. const Mixin = require('../../utils/mixin');
  3. class LocationInfoOpenElementStackMixin extends Mixin {
  4. constructor(stack, opts) {
  5. super(stack);
  6. this.onItemPop = opts.onItemPop;
  7. }
  8. _getOverriddenMethods(mxn, orig) {
  9. return {
  10. pop() {
  11. mxn.onItemPop(this.current);
  12. orig.pop.call(this);
  13. },
  14. popAllUpToHtmlElement() {
  15. for (let i = this.stackTop; i > 0; i--) {
  16. mxn.onItemPop(this.items[i]);
  17. }
  18. orig.popAllUpToHtmlElement.call(this);
  19. },
  20. remove(element) {
  21. mxn.onItemPop(this.current);
  22. orig.remove.call(this, element);
  23. }
  24. };
  25. }
  26. }
  27. module.exports = LocationInfoOpenElementStackMixin;