Commit 2793929b authored by Alexey.Musinov's avatar Alexey.Musinov

Merge branch 'develop' of https://github.com/ONLYOFFICE/sdkjs into develop

parents 85e1c068 0e7603b8
...@@ -37,6 +37,7 @@ function (window, undefined) { ...@@ -37,6 +37,7 @@ function (window, undefined) {
var c_oAscChartTypeSettings = Asc.c_oAscChartTypeSettings; var c_oAscChartTypeSettings = Asc.c_oAscChartTypeSettings;
var c_oAscTickMark = Asc.c_oAscTickMark; var c_oAscTickMark = Asc.c_oAscTickMark;
var c_oAscTickLabelsPos = Asc.c_oAscTickLabelsPos;
function ChartPreviewManager() { function ChartPreviewManager() {
this.previewGroups = []; this.previewGroups = [];
...@@ -320,7 +321,7 @@ ChartPreviewManager.prototype.getChartByType = function(type) ...@@ -320,7 +321,7 @@ ChartPreviewManager.prototype.getChartByType = function(type)
var val_ax_props = new AscCommon.asc_ValAxisSettings(); var val_ax_props = new AscCommon.asc_ValAxisSettings();
val_ax_props.putMinValRule(Asc.c_oAscValAxisRule.auto); val_ax_props.putMinValRule(Asc.c_oAscValAxisRule.auto);
val_ax_props.putMaxValRule(Asc.c_oAscValAxisRule.auto); val_ax_props.putMaxValRule(Asc.c_oAscValAxisRule.auto);
val_ax_props.putTickLabelsPos(Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE); val_ax_props.putTickLabelsPos(c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE);
val_ax_props.putInvertValOrder(false); val_ax_props.putInvertValOrder(false);
val_ax_props.putDispUnitsRule(Asc.c_oAscValAxUnits.none); val_ax_props.putDispUnitsRule(Asc.c_oAscValAxUnits.none);
val_ax_props.putMajorTickMark(c_oAscTickMark.TICK_MARK_NONE); val_ax_props.putMajorTickMark(c_oAscTickMark.TICK_MARK_NONE);
...@@ -331,7 +332,7 @@ ChartPreviewManager.prototype.getChartByType = function(type) ...@@ -331,7 +332,7 @@ ChartPreviewManager.prototype.getChartByType = function(type)
var cat_ax_props = new AscCommon.asc_CatAxisSettings(); var cat_ax_props = new AscCommon.asc_CatAxisSettings();
cat_ax_props.putIntervalBetweenLabelsRule(Asc.c_oAscBetweenLabelsRule.auto); cat_ax_props.putIntervalBetweenLabelsRule(Asc.c_oAscBetweenLabelsRule.auto);
cat_ax_props.putLabelsPosition(Asc.c_oAscLabelsPosition.betweenDivisions); cat_ax_props.putLabelsPosition(Asc.c_oAscLabelsPosition.betweenDivisions);
cat_ax_props.putTickLabelsPos(Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE); cat_ax_props.putTickLabelsPos(c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE);
cat_ax_props.putLabelsAxisDistance(100); cat_ax_props.putLabelsAxisDistance(100);
cat_ax_props.putMajorTickMark(c_oAscTickMark.TICK_MARK_NONE); cat_ax_props.putMajorTickMark(c_oAscTickMark.TICK_MARK_NONE);
cat_ax_props.putMinorTickMark(c_oAscTickMark.TICK_MARK_NONE); cat_ax_props.putMinorTickMark(c_oAscTickMark.TICK_MARK_NONE);
...@@ -399,15 +400,15 @@ ChartPreviewManager.prototype.getChartByType = function(type) ...@@ -399,15 +400,15 @@ ChartPreviewManager.prototype.getChartByType = function(type)
{ {
if(chart_space.chart.plotArea.valAx) if(chart_space.chart.plotArea.valAx)
{ {
chart_space.chart.plotArea.valAx.setTickLblPos(TICK_LABEL_POSITION_NONE); chart_space.chart.plotArea.valAx.setTickLblPos(c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE);
chart_space.chart.plotArea.valAx.setMajorTickMark(TICK_MARK_NONE); chart_space.chart.plotArea.valAx.setMajorTickMark(c_oAscTickMark.TICK_MARK_NONE);
chart_space.chart.plotArea.valAx.setMinorTickMark(TICK_MARK_NONE); chart_space.chart.plotArea.valAx.setMinorTickMark(c_oAscTickMark.TICK_MARK_NONE);
} }
if(chart_space.chart.plotArea.catAx) if(chart_space.chart.plotArea.catAx)
{ {
chart_space.chart.plotArea.catAx.setTickLblPos(TICK_LABEL_POSITION_NONE); chart_space.chart.plotArea.catAx.setTickLblPos(c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE);
chart_space.chart.plotArea.catAx.setMajorTickMark(TICK_MARK_NONE); chart_space.chart.plotArea.catAx.setMajorTickMark(c_oAscTickMark.TICK_MARK_NONE);
chart_space.chart.plotArea.catAx.setMinorTickMark(TICK_MARK_NONE); chart_space.chart.plotArea.catAx.setMinorTickMark(c_oAscTickMark.TICK_MARK_NONE);
} }
} }
if(!chart_space.spPr) if(!chart_space.spPr)
......
...@@ -3582,11 +3582,11 @@ DrawingObjectsController.prototype = ...@@ -3582,11 +3582,11 @@ DrawingObjectsController.prototype =
if(chart_type.getObjectType() === AscDFH.historyitem_type_LineChart ) if(chart_type.getObjectType() === AscDFH.historyitem_type_LineChart )
{ {
if(!AscFormat.isRealBool(chartSettings.showMarker) || chart.view3D) if(!AscFormat.isRealBool(chartSettings.showMarker) || AscFormat.CChartsDrawer.prototype._isSwitchCurrent3DChart(chartSpace))
{ {
chartSettings.showMarker = false; chartSettings.showMarker = false;
} }
if(!AscFormat.isRealBool(chartSettings.bLine) || chart.view3D) if(!AscFormat.isRealBool(chartSettings.bLine) || AscFormat.CChartsDrawer.prototype._isSwitchCurrent3DChart(chartSpace))
{ {
chartSettings.bLine = true; chartSettings.bLine = true;
} }
...@@ -3861,10 +3861,6 @@ DrawingObjectsController.prototype = ...@@ -3861,10 +3861,6 @@ DrawingObjectsController.prototype =
} }
ret.putVertGridLines(calc_grid_lines(hor_axis)); ret.putVertGridLines(calc_grid_lines(hor_axis));
ret.putHorAxisLabel(hor_axis && hor_axis.title ? c_oAscChartHorAxisLabelShowSettings.noOverlay : c_oAscChartTitleShowSettings.none); ret.putHorAxisLabel(hor_axis && hor_axis.title ? c_oAscChartHorAxisLabelShowSettings.noOverlay : c_oAscChartTitleShowSettings.none);
var _label; var _label;
if(vert_axis && vert_axis.title) if(vert_axis && vert_axis.title)
...@@ -3932,7 +3928,7 @@ DrawingObjectsController.prototype = ...@@ -3932,7 +3928,7 @@ DrawingObjectsController.prototype =
var calc_chart_type; var calc_chart_type;
if(chart_type_object_type === AscDFH.historyitem_type_PieChart) if(chart_type_object_type === AscDFH.historyitem_type_PieChart)
{ {
if(!chart.view3D) if(!AscFormat.CChartsDrawer.prototype._isSwitchCurrent3DChart(chart_space))
{ {
calc_chart_type = c_oAscChartTypeSettings.pie; calc_chart_type = c_oAscChartTypeSettings.pie;
} }
...@@ -3948,7 +3944,7 @@ DrawingObjectsController.prototype = ...@@ -3948,7 +3944,7 @@ DrawingObjectsController.prototype =
else if(chart_type_object_type === AscDFH.historyitem_type_BarChart) else if(chart_type_object_type === AscDFH.historyitem_type_BarChart)
{ {
var b_hbar = chart_type.barDir === BAR_DIR_BAR; var b_hbar = chart_type.barDir === BAR_DIR_BAR;
var bView3d = chart.view3D && chart_type.b3D; var bView3d = AscFormat.CChartsDrawer.prototype._isSwitchCurrent3DChart(chart_space);
if(b_hbar) if(b_hbar)
{ {
switch(chart_type.grouping) switch(chart_type.grouping)
...@@ -4025,7 +4021,7 @@ DrawingObjectsController.prototype = ...@@ -4025,7 +4021,7 @@ DrawingObjectsController.prototype =
} }
default : default :
{ {
if(!chart.view3D) if(!AscFormat.CChartsDrawer.prototype._isSwitchCurrent3DChart(chart_space))
{ {
calc_chart_type = c_oAscChartTypeSettings.lineNormal; calc_chart_type = c_oAscChartTypeSettings.lineNormal;
} }
......
...@@ -6007,7 +6007,7 @@ CChartSpace.prototype = ...@@ -6007,7 +6007,7 @@ CChartSpace.prototype =
case AscDFH.historyitem_type_ScatterSer: case AscDFH.historyitem_type_ScatterSer:
case AscDFH.historyitem_type_SurfaceSeries: case AscDFH.historyitem_type_SurfaceSeries:
{ {
if(this.chart.view3D) if(AscFormat.CChartsDrawer.prototype._isSwitchCurrent3DChart(this))
{ {
union_marker.marker = AscFormat.CreateMarkerGeometryByType(AscFormat.SYMBOL_SQUARE, null); union_marker.marker = AscFormat.CreateMarkerGeometryByType(AscFormat.SYMBOL_SQUARE, null);
union_marker.marker.pen = ser.compiledSeriesPen; union_marker.marker.pen = ser.compiledSeriesPen;
...@@ -6030,7 +6030,7 @@ CChartSpace.prototype = ...@@ -6030,7 +6030,7 @@ CChartSpace.prototype =
union_marker.lineMarker = AscFormat.CreateMarkerGeometryByType(AscFormat.SYMBOL_DASH, null); union_marker.lineMarker = AscFormat.CreateMarkerGeometryByType(AscFormat.SYMBOL_DASH, null);
union_marker.lineMarker.pen = ser.compiledSeriesPen.createDuplicate(); //Копируем, так как потом возможно придется изменять толщину линии; union_marker.lineMarker.pen = ser.compiledSeriesPen.createDuplicate(); //Копируем, так как потом возможно придется изменять толщину линии;
} }
if(!b_scatter_no_line && !this.chart.view3D) if(!b_scatter_no_line && !AscFormat.CChartsDrawer.prototype._isSwitchCurrent3DChart(this))
b_line_series = true; b_line_series = true;
break; break;
} }
...@@ -6084,7 +6084,7 @@ CChartSpace.prototype = ...@@ -6084,7 +6084,7 @@ CChartSpace.prototype =
calc_entry.calcMarkerUnion = new AscFormat.CUnionMarker(); calc_entry.calcMarkerUnion = new AscFormat.CUnionMarker();
union_marker = calc_entry.calcMarkerUnion; union_marker = calc_entry.calcMarkerUnion;
if(ser.getObjectType() === AscDFH.historyitem_type_LineSeries && !this.chart.view3D || ser.getObjectType() === AscDFH.historyitem_type_ScatterSer) if(ser.getObjectType() === AscDFH.historyitem_type_LineSeries && !AscFormat.CChartsDrawer.prototype._isSwitchCurrent3DChart(this) || ser.getObjectType() === AscDFH.historyitem_type_ScatterSer)
{ {
if(pt.compiledMarker) if(pt.compiledMarker)
{ {
...@@ -6097,7 +6097,7 @@ CChartSpace.prototype = ...@@ -6097,7 +6097,7 @@ CChartSpace.prototype =
union_marker.lineMarker = AscFormat.CreateMarkerGeometryByType(AscFormat.SYMBOL_DASH, null); union_marker.lineMarker = AscFormat.CreateMarkerGeometryByType(AscFormat.SYMBOL_DASH, null);
union_marker.lineMarker.pen = pt.pen; union_marker.lineMarker.pen = pt.pen;
} }
if(!b_scatter_no_line && !this.chart.view3D) if(!b_scatter_no_line && !AscFormat.CChartsDrawer.prototype._isSwitchCurrent3DChart(this))
b_line_series = true; b_line_series = true;
} }
else else
...@@ -7260,7 +7260,7 @@ CChartSpace.prototype = ...@@ -7260,7 +7260,7 @@ CChartSpace.prototype =
{ {
var plot_area = this.chart.plotArea; var plot_area = this.chart.plotArea;
var default_brush; var default_brush;
if(this.chart.view3D) if(AscFormat.CChartsDrawer.prototype._isSwitchCurrent3DChart(this))
{ {
default_brush = CreateNoFillUniFill(); default_brush = CreateNoFillUniFill();
} }
...@@ -7662,7 +7662,7 @@ CChartSpace.prototype = ...@@ -7662,7 +7662,7 @@ CChartSpace.prototype =
case AscDFH.historyitem_type_RadarChart: case AscDFH.historyitem_type_RadarChart:
{ {
var base_line_fills = getArrayFillsFromBase(style.line4, getMaxIdx(series)); var base_line_fills = getArrayFillsFromBase(style.line4, getMaxIdx(series));
if(!this.chart.view3D) if(!AscFormat.CChartsDrawer.prototype._isSwitchCurrent3DChart(this))
{ {
for(var i = 0; i < series.length; ++i) for(var i = 0; i < series.length; ++i)
{ {
......
...@@ -310,6 +310,7 @@ ...@@ -310,6 +310,7 @@
//--------------------------------------------------------export---------------------------------------------------- //--------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {}; window['AscCommon'] = window['AscCommon'] || {};
window['AscCommon'].CTextMeasurer = CTextMeasurer;
window['AscCommon'].g_oTextMeasurer = g_oTextMeasurer; window['AscCommon'].g_oTextMeasurer = g_oTextMeasurer;
})(window); })(window);
...@@ -47,7 +47,7 @@ var FOCUS_OBJECT_NOTES = 2; ...@@ -47,7 +47,7 @@ var FOCUS_OBJECT_NOTES = 2;
var COMMENT_WIDTH = 18; var COMMENT_WIDTH = 18;
var COMMENT_HEIGHT = 16; var COMMENT_HEIGHT = 16;
CTextMeasurer.prototype.GetAscender = function() AscCommon.CTextMeasurer.prototype.GetAscender = function()
{ {
var UnitsPerEm = this.m_oManager.m_lUnits_Per_Em; var UnitsPerEm = this.m_oManager.m_lUnits_Per_Em;
//var Ascender = this.m_oManager.m_lAscender; //var Ascender = this.m_oManager.m_lAscender;
...@@ -55,7 +55,7 @@ CTextMeasurer.prototype.GetAscender = function() ...@@ -55,7 +55,7 @@ CTextMeasurer.prototype.GetAscender = function()
return Ascender * this.m_oLastFont.SetUpSize / UnitsPerEm * g_dKoef_pt_to_mm; return Ascender * this.m_oLastFont.SetUpSize / UnitsPerEm * g_dKoef_pt_to_mm;
}; };
CTextMeasurer.prototype.GetDescender = function() AscCommon.CTextMeasurer.prototype.GetDescender = function()
{ {
var UnitsPerEm = this.m_oManager.m_lUnits_Per_Em; var UnitsPerEm = this.m_oManager.m_lUnits_Per_Em;
//var Descender = this.m_oManager.m_lDescender; //var Descender = this.m_oManager.m_lDescender;
...@@ -63,7 +63,7 @@ CTextMeasurer.prototype.GetDescender = function() ...@@ -63,7 +63,7 @@ CTextMeasurer.prototype.GetDescender = function()
return Descender * this.m_oLastFont.SetUpSize / UnitsPerEm * g_dKoef_pt_to_mm; return Descender * this.m_oLastFont.SetUpSize / UnitsPerEm * g_dKoef_pt_to_mm;
}; };
CTextMeasurer.prototype.GetHeight = function() AscCommon.CTextMeasurer.prototype.GetHeight = function()
{ {
var UnitsPerEm = this.m_oManager.m_lUnits_Per_Em; var UnitsPerEm = this.m_oManager.m_lUnits_Per_Em;
//var Height = this.m_oManager.m_lLineHeight; //var Height = this.m_oManager.m_lLineHeight;
......
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