(value)
| 332 | zoomChange(127000 / (basicProperty.width || basicWidth)) |
| 333 | } |
| 334 | function zoomChange(value) { |
| 335 | // 让iframe 的宽高也改变 作用为当显示不全时显示滚动条 |
| 336 | const changeWidth = (basicProperty.width || basicWidth) * (value / 100) |
| 337 | const changeHeight = (basicProperty.height || basicHeight) * (value / 100) |
| 338 | const nowLeft = getElementIdProperty('work-frame', 'left') |
| 339 | const nowTop = getElementIdProperty('work-frame', 'left') |
| 340 | rulerRef.current.changeRulerLength(changeWidth + nowLeft, changeHeight + nowTop) // 改变标尺的长度 |
| 341 | iframeRef.current && (iframeRef.current.style.width = `${changeWidth}px`); |
| 342 | iframeRef.current && (iframeRef.current.style.height = `${changeHeight}px`); |
| 343 | setZoom(value); |
| 344 | effectFrame({ |
| 345 | command: 'zoomChange', |
| 346 | property: value, |
| 347 | }); |
| 348 | } |
| 349 | function onPropertyChange(fields, type, command) { |
| 350 | if (type === 'basic' && (command === 'update' || command === 'upload')) { |
| 351 | const tempBasicProperty = JSON.parse(JSON.stringify(basicProperty)) |
no test coverage detected