Fix text art in spreadsheets

pull/1/head
yflory 5 years ago
parent 52e9d2c87a
commit 7f4dbd3245

@ -3214,7 +3214,7 @@ x,y,pageIndex){if(this.drawingObjects.handleEventMode===HANDLE_EVENT_MODE_CURSOR
HANDLE_EVENT_MODE_CURSOR)return{objectId:this.majorObject.Id,cursorType:"text"}},onMouseMove:function(e,x,y,pageIndex){if(!e.IsLocked){this.onMouseUp(e,x,y,pageIndex);return}if(AscFormat.isRealNumber(this.startX)&&AscFormat.isRealNumber(this.startY)){if(Math.abs(this.startX-x)<.001&&Math.abs(this.startY-y)<.001)return;this.startX=undefined;this.startY=undefined}this.majorObject.selectionSetEnd(e,x,y,pageIndex);if(!(this.majorObject.getObjectType()===AscDFH.historyitem_type_GraphicFrame&&this.majorObject.graphicObject.Selection.Type2=== HANDLE_EVENT_MODE_CURSOR)return{objectId:this.majorObject.Id,cursorType:"text"}},onMouseMove:function(e,x,y,pageIndex){if(!e.IsLocked){this.onMouseUp(e,x,y,pageIndex);return}if(AscFormat.isRealNumber(this.startX)&&AscFormat.isRealNumber(this.startY)){if(Math.abs(this.startX-x)<.001&&Math.abs(this.startY-y)<.001)return;this.startX=undefined;this.startY=undefined}this.majorObject.selectionSetEnd(e,x,y,pageIndex);if(!(this.majorObject.getObjectType()===AscDFH.historyitem_type_GraphicFrame&&this.majorObject.graphicObject.Selection.Type2===
table_Selection_Border))this.drawingObjects.updateSelectionState()},onMouseUp:function(e,x,y,pageIndex){var oldCtrl;if(this.drawingObjects.isSlideShow()){oldCtrl=e.CtrlKey;e.CtrlKey=true}this.majorObject.selectionSetEnd(e,x,y,pageIndex);if(this.drawingObjects.isSlideShow())e.CtrlKey=oldCtrl;this.drawingObjects.updateSelectionState();this.drawingObjects.drawingObjects.sendGraphicObjectProps();this.drawingObjects.changeCurrentState(new NullState(this.drawingObjects));this.drawingObjects.handleEventMode= table_Selection_Border))this.drawingObjects.updateSelectionState()},onMouseUp:function(e,x,y,pageIndex){var oldCtrl;if(this.drawingObjects.isSlideShow()){oldCtrl=e.CtrlKey;e.CtrlKey=true}this.majorObject.selectionSetEnd(e,x,y,pageIndex);if(this.drawingObjects.isSlideShow())e.CtrlKey=oldCtrl;this.drawingObjects.updateSelectionState();this.drawingObjects.drawingObjects.sendGraphicObjectProps();this.drawingObjects.changeCurrentState(new NullState(this.drawingObjects));this.drawingObjects.handleEventMode=
HANDLE_EVENT_MODE_CURSOR;this.drawingObjects.noNeedUpdateCursorType=true;var cursor_type=this.drawingObjects.curState.onMouseDown(e,x,y,pageIndex);if(cursor_type&&cursor_type.hyperlink){this.drawingObjects.drawingObjects.showDrawingObjects(true);if(this.drawingObjects.isSlideShow())this.drawingObjects.getEditorApi().sync_HyperlinkClickCallback(cursor_type.hyperlink.Value)}this.drawingObjects.noNeedUpdateCursorType=false;this.drawingObjects.handleEventMode=HANDLE_EVENT_MODE_HANDLE;if(editor&&AscCommon.c_oAscFormatPainterState.kOff!== HANDLE_EVENT_MODE_CURSOR;this.drawingObjects.noNeedUpdateCursorType=true;var cursor_type=this.drawingObjects.curState.onMouseDown(e,x,y,pageIndex);if(cursor_type&&cursor_type.hyperlink){this.drawingObjects.drawingObjects.showDrawingObjects(true);if(this.drawingObjects.isSlideShow())this.drawingObjects.getEditorApi().sync_HyperlinkClickCallback(cursor_type.hyperlink.Value)}this.drawingObjects.noNeedUpdateCursorType=false;this.drawingObjects.handleEventMode=HANDLE_EVENT_MODE_HANDLE;if(editor&&AscCommon.c_oAscFormatPainterState.kOff!==
editor.isPaintFormat){this.drawingObjects.paragraphFormatPaste2();if(AscCommon.c_oAscFormatPainterState.kOn===editor.isPaintFormat)editor.sync_PaintFormatCallback(c_oAscFormatPainterState.kOff)}}};function SplineBezierState(drawingObjects){this.drawingObjects=drawingObjects;this.polylineFlag=true}SplineBezierState.prototype={onMouseDown:function(e,x,y,pageIndex){if(this.drawingObjects.handleEventMode===HANDLE_EVENT_MODE_CURSOR)return{objectId:"1",bMarker:true,cursorType:"crosshair"};this.drawingObjects.startTrackPos= editor.isPaintFormat){if(AscCommon.c_oAscFormatPainterState.kOn===editor.isPaintFormat)editor.sync_PaintFormatCallback(c_oAscFormatPainterState.kOff)}}};function SplineBezierState(drawingObjects){this.drawingObjects=drawingObjects;this.polylineFlag=true}SplineBezierState.prototype={onMouseDown:function(e,x,y,pageIndex){if(this.drawingObjects.handleEventMode===HANDLE_EVENT_MODE_CURSOR)return{objectId:"1",bMarker:true,cursorType:"crosshair"};this.drawingObjects.startTrackPos=
{x:x,y:y,pageIndex:pageIndex};this.drawingObjects.clearTrackObjects();this.drawingObjects.addTrackObject(new AscFormat.Spline(this.drawingObjects,this.drawingObjects.getTheme(),null,null,null,pageIndex));this.drawingObjects.arrTrackObjects[0].path.push(new AscFormat.SplineCommandMoveTo(x,y));this.drawingObjects.changeCurrentState(new SplineBezierState33(this.drawingObjects,x,y,pageIndex));this.drawingObjects.checkChartTextSelection();this.drawingObjects.resetSelection();this.drawingObjects.updateOverlay()}, {x:x,y:y,pageIndex:pageIndex};this.drawingObjects.clearTrackObjects();this.drawingObjects.addTrackObject(new AscFormat.Spline(this.drawingObjects,this.drawingObjects.getTheme(),null,null,null,pageIndex));this.drawingObjects.arrTrackObjects[0].path.push(new AscFormat.SplineCommandMoveTo(x,y));this.drawingObjects.changeCurrentState(new SplineBezierState33(this.drawingObjects,x,y,pageIndex));this.drawingObjects.checkChartTextSelection();this.drawingObjects.resetSelection();this.drawingObjects.updateOverlay()},
onMouseMove:function(e,X,Y,pageIndex){},onMouseUp:function(e,X,Y,pageIndex){if(Asc["editor"])Asc["editor"].asc_endAddShape();else if(editor&&editor.sync_EndAddShape)editor.sync_EndAddShape();this.drawingObjects.changeCurrentState(new NullState(this.drawingObjects));this.drawingObjects.curState.updateAnchorPos()}};function SplineBezierState33(drawingObjects,startX,startY,pageIndex){this.drawingObjects=drawingObjects;this.polylineFlag=true;this.pageIndex=pageIndex}SplineBezierState33.prototype={onMouseDown:function(e, onMouseMove:function(e,X,Y,pageIndex){},onMouseUp:function(e,X,Y,pageIndex){if(Asc["editor"])Asc["editor"].asc_endAddShape();else if(editor&&editor.sync_EndAddShape)editor.sync_EndAddShape();this.drawingObjects.changeCurrentState(new NullState(this.drawingObjects));this.drawingObjects.curState.updateAnchorPos()}};function SplineBezierState33(drawingObjects,startX,startY,pageIndex){this.drawingObjects=drawingObjects;this.polylineFlag=true;this.pageIndex=pageIndex}SplineBezierState33.prototype={onMouseDown:function(e,
x,y,pageIndex){if(this.drawingObjects.handleEventMode===HANDLE_EVENT_MODE_CURSOR)return{objectId:"1",bMarker:true,cursorType:"crosshair"}},onMouseMove:function(e,x,y,pageIndex){var startPos=this.drawingObjects.startTrackPos;if(startPos.x===x&&startPos.y===y&&startPos.pageIndex===pageIndex)return;var tr_x,tr_y;if(pageIndex===startPos.pageIndex){tr_x=x;tr_y=y}else{var tr_point=this.drawingObjects.getDrawingDocument().ConvertCoordsToAnotherPage(x,y,pageIndex,startPos.pageIndex);tr_x=tr_point.X;tr_y= x,y,pageIndex){if(this.drawingObjects.handleEventMode===HANDLE_EVENT_MODE_CURSOR)return{objectId:"1",bMarker:true,cursorType:"crosshair"}},onMouseMove:function(e,x,y,pageIndex){var startPos=this.drawingObjects.startTrackPos;if(startPos.x===x&&startPos.y===y&&startPos.pageIndex===pageIndex)return;var tr_x,tr_y;if(pageIndex===startPos.pageIndex){tr_x=x;tr_y=y}else{var tr_point=this.drawingObjects.getDrawingDocument().ConvertCoordsToAnotherPage(x,y,pageIndex,startPos.pageIndex);tr_x=tr_point.X;tr_y=

Loading…
Cancel
Save