efront 3.20.15 → 3.21.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.
@@ -149,6 +149,9 @@ function cross_(jsonp, digest = noop, method, url, headers) {
149
149
  }
150
150
 
151
151
  }
152
+ if (exposeMap["strict-transport-security"] || exposeMap["efront-transport-security"]) {
153
+ if (!/^https\:\/\/|^s\/\//.test(url)) console.warn("请使用https访问如下路径:" + url);
154
+ }
152
155
  }
153
156
  if (isencrypt && xhr.response) {
154
157
  try {
@@ -101,6 +101,7 @@ var $scope = {
101
101
  }
102
102
  },
103
103
  process(currentTime, duration) {
104
+ render.refresh();
104
105
  if (currentTime === duration) {
105
106
  $scope.pause();
106
107
  return false;
@@ -179,6 +180,7 @@ var $scope = {
179
180
  }
180
181
  },
181
182
  play(hash = musicList.active_hash) {
183
+ render.refresh();
182
184
  var isPlayback = typeof hash === "number";
183
185
  if (isPlayback) {
184
186
  if (hash < 0) {
@@ -232,7 +234,6 @@ var $scope = {
232
234
  return alert("暂不支持在您的浏览器中播放!");
233
235
  }
234
236
  musicList.active_hash = hash;
235
- render.refresh();
236
237
  $scope.playing = true;
237
238
  playState.width = 0;
238
239
  getMusicInfo(hash).loading_promise.then((response) => {
@@ -295,16 +296,13 @@ var createControls = function () {
295
296
  var player = document.createElement("music-player");
296
297
  player.setAttribute("ng-class", "{play:playing===true,pause:playing===false,page:page,effect:effect}");
297
298
  player.innerHTML = Player;
298
- var [background, progress] = player.children;
299
- bindtouch(player, function (value) {
300
- if (value) {
301
- touching = true;
302
- var { x } = value;
303
- let _audio = $scope.audio;
304
- css(progress, { width: x });
305
- $scope.process(x / player.offsetWidth * _audio.duration, _audio.duration);
306
- }
307
- return { x: progress.offsetWidth };
299
+ var [, progress] = player.children;
300
+ bindtouch(player, function (_, event) {
301
+ touching = true;
302
+ var x = event.clientX - getScreenPosition(player).left;
303
+ let _audio = $scope.audio
304
+ css(progress, { width: x });
305
+ $scope.process(x / player.offsetWidth * _audio.duration, _audio.duration);
308
306
  }, "x");
309
307
  bindtouch(player, function (value) {
310
308
  var top = getScreenPosition(player).top;
@@ -7,6 +7,7 @@ function lattice(element, minWidth, maxWidth = minWidth << 1, layers) {
7
7
  if (!_layers.length) return;
8
8
  var clientWidth = parseFloat(freePixel(_box.clientWidth));
9
9
  if (!clientWidth) return;
10
+ var savedCount = boxCount;
10
11
  boxCount = clientWidth / minWidth | 0;
11
12
  if (boxCount >= _layers.length) {
12
13
  boxCount = _layers.length;
@@ -21,6 +22,12 @@ function lattice(element, minWidth, maxWidth = minWidth << 1, layers) {
21
22
  else removeClass(_box, inadequate_class);
22
23
  _box.paddingMax = boxCount;
23
24
  _box.group = boxCount;
25
+ if (savedCount === boxCount) return;
26
+ _box.clean();
27
+ [].forEach.call(_box.children, function (c) {
28
+ build(c);
29
+ });
30
+ return true;
24
31
  };
25
32
  if (layers) {
26
33
  var _box = list(element, function (index) {
@@ -53,19 +60,19 @@ function lattice(element, minWidth, maxWidth = minWidth << 1, layers) {
53
60
  if (element.with instanceof Array) element.with.forEach(build);
54
61
  else if (isElement(element.with)) build(element.with);
55
62
  };
63
+ var go = _box.go;
64
+ _box.go = function () {
65
+ resize();
66
+ go.apply(this, arguments);
67
+ };
56
68
  _box.resize = lazy(function () {
57
- var savedCount = boxCount;
58
- console.log(savedCount)
59
69
  var index = _box.index();
60
- resize();
61
- if (savedCount === boxCount) return;
62
- var realIndex = index * (savedCount || 1);
63
- index = realIndex / boxCount || 0;
64
- _box.clean();
65
- [].forEach.call(_box.children, function (c) {
66
- build(c);
67
- });
68
- _box.go(index);
70
+ var savedCount = boxCount;
71
+ if (resize()) {
72
+ var realIndex = index * (savedCount || 1);
73
+ index = realIndex / boxCount || 0;
74
+ go.call(_box, index);
75
+ }
69
76
  });
70
77
  resizingList.set(_box);
71
78
  on('resize')(_box, _box.resize);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "3.20.15",
3
+ "version": "3.21.0",
4
4
  "description": "一个开发工具,开放源代码,自带组件库和编译环境,可以用来开发web组件,web应用或nodejs模块,或做为已有代码的加密工具,也可以做为静态页面服务器或跨域中转服务器使用",
5
5
  "main": "public/efront.js",
6
6
  "directories": {