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.

getLocation.js 535B

12345678910111213141516171819
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const utils_1 = require("../../utils");
  4. async function getLocation(prop) {
  5. let location = {};
  6. if (this.isW3C) {
  7. location = await utils_1.getElementRect(this);
  8. delete location.width;
  9. delete location.height;
  10. }
  11. else {
  12. location = await this.getElementLocation(this.elementId);
  13. }
  14. if (prop === 'x' || prop === 'y') {
  15. return location[prop];
  16. }
  17. return location;
  18. }
  19. exports.default = getLocation;