mirror of https://github.com/ElemeFE/element
修复el-image大图预览的时候,拖动图片图片的移动距离和鼠标移动距离不对应
parent
290e68ea6a
commit
d4344d78b2
|
@ -137,8 +137,9 @@ export default {
|
||||||
const style = {
|
const style = {
|
||||||
transform: `scale(${scale}) rotate(${deg}deg)`,
|
transform: `scale(${scale}) rotate(${deg}deg)`,
|
||||||
transition: enableTransition ? 'transform .3s' : '',
|
transition: enableTransition ? 'transform .3s' : '',
|
||||||
'margin-left': `${offsetX}px`,
|
/* fixed the margin movement distance is not correct */
|
||||||
'margin-top': `${offsetY}px`
|
'margin-left': `${offsetX * 2}px`,
|
||||||
|
'margin-top': `${offsetY * 2}px`
|
||||||
};
|
};
|
||||||
if (this.mode === Mode.CONTAIN) {
|
if (this.mode === Mode.CONTAIN) {
|
||||||
style.maxWidth = style.maxHeight = '100%';
|
style.maxWidth = style.maxHeight = '100%';
|
||||||
|
|
Loading…
Reference in New Issue