@conecli/cone-render 0.8.19-shop.8 → 0.8.20

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.
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] = {
3
2
  displayHeight: 1920,
4
3
  offSetY: 0
5
4
  }
6
5
  console.log('>>>>>>>>>>>>>>>>>>> render taroEventSendPageScrollInfo origin time:', Date.now(), 'res:', options)
7
6
  if(options){
8
7
  latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] = options
9
8
  }
10
9
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
11
10
  const { displayHeight, offSetY } = res
12
11
  if (typeof displayHeight === 'undefined' || typeof offSetY === 'undefined') return
13
12
 
14
13
  if (isIosDevice) return res
15
14
 
16
15
  if (isAndroidDevice) {
17
16
  const deviceRatio = window.devicePixelRatio
18
17
  const cssDisplayHeight = Math.ceil(displayHeight / deviceRatio)
19
18
  const cssOffsetY = Math.ceil(offSetY / deviceRatio)
20
19
  return {
21
20
  displayHeight: cssDisplayHeight,
22
21
  offSetY: cssOffsetY
23
22
  }
24
23
  }
24
+ import Taro from '@tarojs/taro'
25
25
  latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] = {
26
26
  displayHeight: 1920,
27
27
  offSetY: 0
28
28
  }
29
29
  console.log('>>>>>>>>>>>>>>>>>>> render taroEventSendPageScrollInfo origin time:', Date.now(), 'res:', options)
30
30
  if(options){
31
31
  latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] = options
32
32
  }
33
33
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
34
34
  const { displayHeight, offSetY } = res
35
35
  if (typeof displayHeight === 'undefined' || typeof offSetY === 'undefined') return
36
36
 
37
37
  if (isIosDevice) return res
38
38
 
39
39
  if (isAndroidDevice) {
40
40
  const deviceRatio = window.devicePixelRatio
41
41
  const cssDisplayHeight = Math.ceil(displayHeight / deviceRatio)
42
42
  const cssOffsetY = Math.ceil(offSetY / deviceRatio)
43
43
  return {
44
44
  displayHeight: cssDisplayHeight,
45
45
  offSetY: cssOffsetY
46
46
  }
47
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conecli/cone-render",
3
- "version": "0.8.19-shop.8",
3
+ "version": "0.8.20",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist/"