如题..只取消放大回弹效果 缩小的不取消...

- 发布:2015-11-03 14:53
- 更新:2018-11-07 10:28
- 阅读:8977

能的。在mui.previewimage.js 找
proto._getScale = function(from, to) {
var scaleX = from.width / to.width;
var scaleY = from.height / to.height;
var scale = 1;
if (scaleX <= scaleY) {
scale = from.height/ (to.height scaleX);
} else {
scale = from.width / (to.width scaleY);
}
return scale;
};
其中两句。改成
scale = from.height2/ (to.height scaleX);
scale = from.width2/ (to.width scaleY);
这样就不会回缩了。而最大的放大比例是当时的2倍。

jtshushu - 擅长:PHP-Thinkphp Python MUI UniApp Vuejs Bootstrap Jq Logo设计 广告设计 网页设计 有项目上需要联系我微信号:jtshushu66
mui.zoom.js与mui.previewimage.js 在那里下载
String (作者)
多谢。
2016-02-29 12:03