nuke-dimensions
Advanced tools
Comparing version 0.1.4 to 0.1.5
# Changelog | ||
## 0.1.5 / 2017-05-25 | ||
* [[cc9ddb9](http://gitlab.alibaba-inc.com/nuke/dimensions/commit/cc9ddb96479cf263f4f9f13f78851f353fbcfc36)] - `fix` fix string format in android | ||
## 0.1.4 / 2017-05-16 | ||
@@ -5,0 +9,0 @@ |
@@ -25,7 +25,9 @@ 'use strict'; | ||
var weexEnv = typeof WXEnvironment !== 'undefined' ? WXEnvironment : {}; | ||
var scale = weexEnv.scale || DEFAULT_SCALE; | ||
weexEnv.deviceHeight = parseInt(weexEnv.deviceHeight, 10); | ||
weexEnv.deviceWidth = parseInt(weexEnv.deviceWidth, 10); | ||
var scale = parseInt(weexEnv.scale, 10) || DEFAULT_SCALE; | ||
if (landscape) { | ||
dimensions = { | ||
window: { | ||
width: weexEnv.deviceHeight * 750 / weexEnv.deviceWidth.toFixed(), | ||
width: (weexEnv.deviceHeight * 750 / weexEnv.deviceWidth).toFixed(), | ||
@@ -32,0 +34,0 @@ scale: scale, |
{ | ||
"name": "nuke-dimensions", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "屏幕参数", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
@@ -16,3 +16,3 @@ /** @jsx createElement */ | ||
press = ()=>{ | ||
let { height, width } = Dimensions.get('window'); | ||
let { height, width } = Dimensions.getWindowInfo(); | ||
this.setState({ | ||
@@ -19,0 +19,0 @@ width:width, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8970
142