Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

定义了宽高之后,图片变形 #25

Open
chengxianyi opened this issue Dec 25, 2017 · 3 comments
Open

定义了宽高之后,图片变形 #25

chengxianyi opened this issue Dec 25, 2017 · 3 comments

Comments

@chengxianyi
Copy link

定义了宽高之后,图片变形,如果图片过长,需要向下滑动查看全部,预览页会关闭

@minchangyong
Copy link

没有自动获取图片宽高度的。这个插件就废了

@random-yang
Copy link

定义宽度高度的时候不能自适应比例,所以它已经废了。。。

@random-yang
Copy link

既然它自己不能获取,那就自己获取咯
code fragment:

let imageCatch = new Image();
imageCatch.src = dataUrl;
imageCatch.onload = () => {
//  do something with
//  w: imageCatch.width,
//  h: imageCatch.height
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants