efront 4.26.1 → 4.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ var fullscreen = {
13
13
  return hasTarget();
14
14
  }(),
15
15
  is() {
16
- if(/Android|iPad|iPhone/i.test(navigator.userAgent)){
16
+ if (/Android|iPad|iPhone/i.test(navigator.userAgent)) {
17
17
  return hasTarget();
18
18
  }
19
19
  if (/chrome/i.test(navigator.userAgent)) {//webkit
@@ -31,6 +31,12 @@ var fullscreen = {
31
31
  exec(element) {
32
32
  requestFullScreen(element);
33
33
  },
34
+ open() {
35
+ if (!this.is()) this.change();
36
+ },
37
+ close() {
38
+ this.exit();
39
+ },
34
40
  change() {
35
41
  if (this.is()) this.exit(alert);
36
42
  else this.exec(arguments[0] || document.documentElement);
@@ -94,7 +94,7 @@ function move(offsetLeft, offsetTop, preventOverflow, keepOriginIfPosible) {
94
94
  }
95
95
  return [offsetLeft, offsetTop];
96
96
  }
97
- move.getPosition = function (target) {
97
+ var getPosition = move.getPosition = function (target) {
98
98
  var {
99
99
  offsetLeft,
100
100
  offsetTop,
@@ -132,7 +132,11 @@ var setPosition = move.setPosition = function (target, [x, y]) {
132
132
  var offsetTop = getOffsetLeft(y, offsetHeight, clientHeight);
133
133
  move.call(target, offsetLeft, offsetTop, undefined, false);
134
134
  };
135
-
135
+ var setSize = move.setSize = function (target, [w, h]) {
136
+ var p = getPosition(target);
137
+ css(target, { width: w, height: h });
138
+ setPosition(target, p);
139
+ };
136
140
  var fixPosition = move.fixPosition = function (target) {
137
141
  var computed = getComputedStyle(target);
138
142
  var {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.26.1",
3
+ "version": "4.27.0",
4
4
  "description": "一个开发环境,提供一种自由的前端开发模式,也可作为辅助工具使用。",
5
5
  "main": "public/efront.js",
6
6
  "directories": {