Commit d5539409 authored by Alexander.Trofimov's avatar Alexander.Trofimov

common/Drawings/ArcTo to function-closure

parent 4801428f
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
"../common/apiCommon.js", "../common/apiCommon.js",
"../common/editorscommon.js", "../common/editorscommon.js",
"../common/NumFormat.js", "../common/NumFormat.js",
"../common/Drawings/ArcTo.js",
"../common/Drawings/Format/Constants.js", "../common/Drawings/Format/Constants.js",
"../common/Drawings/CommonController.js", "../common/Drawings/CommonController.js",
...@@ -83,7 +85,6 @@ ...@@ -83,7 +85,6 @@
"../cell/view/EventsController.js", "../cell/view/EventsController.js",
"../cell/view/WorkbookView.js", "../cell/view/WorkbookView.js",
"../word/Editor/SerializeCommon.js", "../word/Editor/SerializeCommon.js",
"../common/Drawings/ArcTo.js",
"../common/Drawings/ColorArray.js", "../common/Drawings/ColorArray.js",
"../common/Shapes/Serialize.js", "../common/Shapes/Serialize.js",
"../common/Shapes/SerializeWriter.js", "../common/Shapes/SerializeWriter.js",
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
"../common/apiCommon.js", "../common/apiCommon.js",
"../common/editorscommon.js", "../common/editorscommon.js",
"../common/NumFormat.js", "../common/NumFormat.js",
"../common/Drawings/ArcTo.js",
"../common/Drawings/Format/Constants.js", "../common/Drawings/Format/Constants.js",
"../common/Drawings/CommonController.js", "../common/Drawings/CommonController.js",
...@@ -82,7 +84,6 @@ ...@@ -82,7 +84,6 @@
"../common/Shapes/Serialize.js", "../common/Shapes/Serialize.js",
"../common/Shapes/SerializeWriter.js", "../common/Shapes/SerializeWriter.js",
"../word/Editor/SerializeCommon.js", "../word/Editor/SerializeCommon.js",
"../common/Drawings/ArcTo.js",
"../common/Drawings/ColorArray.js", "../common/Drawings/ColorArray.js",
"../slide/Editor/Format/Presentation.js", "../slide/Editor/Format/Presentation.js",
"../cell/view/DrawingObjectsController.js", "../cell/view/DrawingObjectsController.js",
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
"../common/apiCommon.js", "../common/apiCommon.js",
"../common/editorscommon.js", "../common/editorscommon.js",
"../common/NumFormat.js", "../common/NumFormat.js",
"../common/Drawings/ArcTo.js",
"../common/Drawings/Format/Constants.js", "../common/Drawings/Format/Constants.js",
"../common/Drawings/CommonController.js", "../common/Drawings/CommonController.js",
...@@ -57,7 +59,6 @@ ...@@ -57,7 +59,6 @@
"../common/Drawings/TrackObjects/ResizeTracks.js", "../common/Drawings/TrackObjects/ResizeTracks.js",
"../common/Drawings/TrackObjects/RotateTracks.js", "../common/Drawings/TrackObjects/RotateTracks.js",
"../common/Drawings/TrackObjects/Spline.js", "../common/Drawings/TrackObjects/Spline.js",
"../common/Drawings/ArcTo.js",
"../common/Drawings/ColorArray.js", "../common/Drawings/ColorArray.js",
"../common/Drawings/DrawingObjectsHandlers.js", "../common/Drawings/DrawingObjectsHandlers.js",
"../common/Drawings/Hit.js", "../common/Drawings/Hit.js",
......
"use strict"; "use strict";
var ArcToCurvers = null;
var ArcToOnCanvas = null;
var HitToArc = null;
(function(){ (function(){
// arcTo new version // arcTo new version
function Arc3(ctx, fX, fY, fWidth, fHeight, fStartAngle, fSweepAngle) function Arc3(ctx, fX, fY, fWidth, fHeight, fStartAngle, fSweepAngle)
...@@ -189,8 +186,6 @@ var HitToArc = null; ...@@ -189,8 +186,6 @@ var HitToArc = null;
} }
} }
ArcToCurvers = Arc3;
// ----------------------------------------------------------------------- // // ----------------------------------------------------------------------- //
function _ArcToOnCanvas(context, start_x, start_y, width_r, height_r, start_ang, sweep_ang) function _ArcToOnCanvas(context, start_x, start_y, width_r, height_r, start_ang, sweep_ang)
...@@ -539,7 +534,9 @@ var HitToArc = null; ...@@ -539,7 +534,9 @@ var HitToArc = null;
} }
} }
ArcToOnCanvas = _ArcToOnCanvas; //--------------------------------------------------------export----------------------------------------------------
HitToArc = _HitToArc; window['AscFormat'] = window['AscFormat'] || {};
// ----------------------------------------------------------------------- // window['AscFormat'].ArcToCurvers = Arc3;
})(); window['AscFormat'].HitToArc = _HitToArc;
\ No newline at end of file window['AscFormat'].ArcToOnCanvas = _ArcToOnCanvas;
})();
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
* @param {undefined} undefined * @param {undefined} undefined
*/ */
function (window, undefined) { function (window, undefined) {
// Import
var ArcToCurvers = AscFormat.ArcToCurvers;
var EPSILON_TEXT_AUTOFIT = 0.001; var EPSILON_TEXT_AUTOFIT = 0.001;
var FORMULA_TYPE_MULT_DIV = 0, var FORMULA_TYPE_MULT_DIV = 0,
......
...@@ -15,6 +15,9 @@ var moveTo=0, ...@@ -15,6 +15,9 @@ var moveTo=0,
// Import // Import
var cToRad = AscFormat.cToRad; var cToRad = AscFormat.cToRad;
var HitToArc = AscFormat.HitToArc;
var ArcToCurvers = AscFormat.ArcToCurvers;
var ArcToOnCanvas = AscFormat.ArcToOnCanvas;
var cToRad2 = (Math.PI/60000)/180; var cToRad2 = (Math.PI/60000)/180;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment