Commit 92289066 authored by Alexey.Musinov's avatar Alexey.Musinov

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

* 'develop' of https://github.com/ONLYOFFICE/sdkjs:
  Build sdk.js in application folder
  wheelDelta -> wheelDeltaY
  delete unused methods
  fix Bug 33912
  Delete *.cache files on build sdk-all.js
parents b9bbf300 8bc38736
...@@ -91,7 +91,10 @@ module.exports = function(grunt) { ...@@ -91,7 +91,10 @@ module.exports = function(grunt) {
grunt.registerTask('build_all', ['build_webword_init', 'build_sdk', 'build_webexcel_init', 'build_sdk', 'build_webpowerpoint_init', 'build_sdk']); grunt.registerTask('build_all', ['build_webword_init', 'build_sdk', 'build_webexcel_init', 'build_sdk', 'build_webpowerpoint_init', 'build_sdk']);
grunt.registerTask('concat_sdk_init', function() { grunt.registerTask('concat_sdk_init', function() {
var sdkTmp = 'sdk-tmp.js', sdkAllTmp = 'sdk-all-tmp.js', sdkAllMinTmp = 'sdk-all-min-tmp.js'; var sdkDstFolder = packageFile['compile']['sdk']['dst'];
var sdkTmp = sdkDstFolder + '/sdk-tmp.js';
var sdkAllTmp = sdkDstFolder + '/sdk-all-tmp.js';
var sdkAllMinTmp = sdkDstFolder + '/sdk-all-min-tmp.js';
var srcFilesMin = packageFile['compile']['sdk']['min']; var srcFilesMin = packageFile['compile']['sdk']['min'];
var srcFilesAll = packageFile['compile']['sdk']['common']; var srcFilesAll = packageFile['compile']['sdk']['common'];
var sdkOpt = {}; var sdkOpt = {};
...@@ -147,20 +150,28 @@ module.exports = function(grunt) { ...@@ -147,20 +150,28 @@ module.exports = function(grunt) {
dest: sdkTmp dest: sdkTmp
} }
}, },
clean: [ clean: {
tmp: {
options: {
force: true
},
src: [
sdkAllMinTmp, sdkAllMinTmp,
sdkAllTmp sdkAllTmp
] ]
}
}
}); });
}); });
grunt.registerTask('compile_sdk_init', function() { grunt.registerTask('compile_sdk_init', function() {
var sdkTmp = 'sdk-tmp.js';
var splitLine = ''; var splitLine = '';
var tmp_sdk_path = 'sdk-js-tmp.js';
var sdkDstFolder = packageFile['compile']['sdk']['dst']; var sdkDstFolder = packageFile['compile']['sdk']['dst'];
var sdkTmp = sdkDstFolder + '/sdk-tmp.js';
var tmp_sdk_path = sdkDstFolder + '/sdk-js-tmp.js';
var sdkAllMinDst = sdkDstFolder + '/sdk-all-min.js'; var sdkAllMinDst = sdkDstFolder + '/sdk-all-min.js';
var sdkAllDst = sdkDstFolder + '/sdk-all.js'; var sdkAllDst = sdkDstFolder + '/sdk-all.js';
var sdkAllCashe = sdkDstFolder + '/*.cache'
var sdkOpt = { var sdkOpt = {
compilation_level: level, compilation_level: level,
warning_level: 'QUIET', warning_level: 'QUIET',
...@@ -203,10 +214,18 @@ module.exports = function(grunt) { ...@@ -203,10 +214,18 @@ module.exports = function(grunt) {
dest: sdkAllDst dest: sdkAllDst
} }
}, },
clean: [ clean: {
tmp: {
options: {
force: true
},
src: [
sdkTmp, sdkTmp,
tmp_sdk_path tmp_sdk_path,
], sdkAllCashe
]
}
},
replace: { replace: {
version: { version: {
options: { options: {
......
...@@ -1657,16 +1657,6 @@ ...@@ -1657,16 +1657,6 @@
return {x: x, y: y}; return {x: x, y: y};
}; };
asc_CEventsController.prototype._onTouchStart = function (event) {
this.view.MobileTouchManager.onTouchStart(event);
};
asc_CEventsController.prototype._onTouchMove = function (event) {
this.view.MobileTouchManager.onTouchMove(event);
};
asc_CEventsController.prototype._onTouchEnd = function (event) {
this.view.MobileTouchManager.onTouchEnd(event);
};
//------------------------------------------------------------export--------------------------------------------------- //------------------------------------------------------------export---------------------------------------------------
window['AscCommonExcel'] = window['AscCommonExcel'] || {}; window['AscCommonExcel'] = window['AscCommonExcel'] || {};
window["AscCommonExcel"].asc_CEventsController = asc_CEventsController; window["AscCommonExcel"].asc_CEventsController = asc_CEventsController;
......
...@@ -194,7 +194,7 @@ function (window, undefined) { ...@@ -194,7 +194,7 @@ function (window, undefined) {
drawingsChangesMap[AscDFH.historyitem_BubbleSeries_SetBubble3D] = function(oClass, value){oClass.bubble3D = value;}; drawingsChangesMap[AscDFH.historyitem_BubbleSeries_SetBubble3D] = function(oClass, value){oClass.bubble3D = value;};
drawingsChangesMap[AscDFH.historyitem_BubbleSeries_SetBubbleSize] = function(oClass, value){oClass.bubbleSize = value;}; drawingsChangesMap[AscDFH.historyitem_BubbleSeries_SetBubbleSize] = function(oClass, value){oClass.bubbleSize = value;};
drawingsChangesMap[AscDFH.historyitem_BubbleSeries_SetDLbls] = function(oClass, value){oClass.dLbls = value;}; drawingsChangesMap[AscDFH.historyitem_BubbleSeries_SetDLbls] = function(oClass, value){oClass.dLbls = value;};
drawingsChangesMap[AscDFH.historyitem_BubbleSeries_SetDPt] = function(oClass, value){oClass.dPt = value;};
drawingsChangesMap[AscDFH.historyitem_BubbleSeries_SetErrBars] = function(oClass, value){oClass.errBars = value;}; drawingsChangesMap[AscDFH.historyitem_BubbleSeries_SetErrBars] = function(oClass, value){oClass.errBars = value;};
drawingsChangesMap[AscDFH.historyitem_BubbleSeries_SetIdx] = function(oClass, value){oClass.idx = value;}; drawingsChangesMap[AscDFH.historyitem_BubbleSeries_SetIdx] = function(oClass, value){oClass.idx = value;};
drawingsChangesMap[AscDFH.historyitem_BubbleSeries_SetInvertIfNegative] = function(oClass, value){oClass.invertIfNegative = value;}; drawingsChangesMap[AscDFH.historyitem_BubbleSeries_SetInvertIfNegative] = function(oClass, value){oClass.invertIfNegative = value;};
...@@ -281,7 +281,6 @@ function (window, undefined) { ...@@ -281,7 +281,6 @@ function (window, undefined) {
drawingsChangesMap[AscDFH.historyitem_LineChart_SetVaryColors] = function(oClass, value){oClass.varyColors = value;}; drawingsChangesMap[AscDFH.historyitem_LineChart_SetVaryColors] = function(oClass, value){oClass.varyColors = value;};
drawingsChangesMap[AscDFH.historyitem_LineSeries_SetCat] = function(oClass, value){oClass.cat = value;}; drawingsChangesMap[AscDFH.historyitem_LineSeries_SetCat] = function(oClass, value){oClass.cat = value;};
drawingsChangesMap[AscDFH.historyitem_LineSeries_SetDLbls] = function(oClass, value){oClass.dLbls = value;}; drawingsChangesMap[AscDFH.historyitem_LineSeries_SetDLbls] = function(oClass, value){oClass.dLbls = value;};
drawingsChangesMap[AscDFH.historyitem_LineSeries_SetDPt] = function(oClass, value){oClass.dPt = value;};
drawingsChangesMap[AscDFH.historyitem_LineSeries_SetErrBars] = function(oClass, value){oClass.errBars = value;}; drawingsChangesMap[AscDFH.historyitem_LineSeries_SetErrBars] = function(oClass, value){oClass.errBars = value;};
drawingsChangesMap[AscDFH.historyitem_LineSeries_SetIdx] = function(oClass, value){oClass.idx = value;}; drawingsChangesMap[AscDFH.historyitem_LineSeries_SetIdx] = function(oClass, value){oClass.idx = value;};
drawingsChangesMap[AscDFH.historyitem_LineSeries_SetMarker] = function(oClass, value){oClass.marker = value;}; drawingsChangesMap[AscDFH.historyitem_LineSeries_SetMarker] = function(oClass, value){oClass.marker = value;};
...@@ -325,7 +324,6 @@ function (window, undefined) { ...@@ -325,7 +324,6 @@ function (window, undefined) {
drawingsChangesMap[AscDFH.historyitem_PieChart_SetVaryColors] = function(oClass, value){oClass.varyColors = value;}; drawingsChangesMap[AscDFH.historyitem_PieChart_SetVaryColors] = function(oClass, value){oClass.varyColors = value;};
drawingsChangesMap[AscDFH.historyitem_PieSeries_SetCat] = function(oClass, value){oClass.cat = value;}; drawingsChangesMap[AscDFH.historyitem_PieSeries_SetCat] = function(oClass, value){oClass.cat = value;};
drawingsChangesMap[AscDFH.historyitem_PieSeries_SetDLbls] = function(oClass, value){oClass.dLbls = value;}; drawingsChangesMap[AscDFH.historyitem_PieSeries_SetDLbls] = function(oClass, value){oClass.dLbls = value;};
drawingsChangesMap[AscDFH.historyitem_PieSeries_SetDPt] = function(oClass, value){oClass.dPt = value;};
drawingsChangesMap[AscDFH.historyitem_PieSeries_SetExplosion] = function(oClass, value){oClass.explosion = value;}; drawingsChangesMap[AscDFH.historyitem_PieSeries_SetExplosion] = function(oClass, value){oClass.explosion = value;};
drawingsChangesMap[AscDFH.historyitem_PieSeries_SetIdx] = function(oClass, value){oClass.idx = value;}; drawingsChangesMap[AscDFH.historyitem_PieSeries_SetIdx] = function(oClass, value){oClass.idx = value;};
drawingsChangesMap[AscDFH.historyitem_PieSeries_SetOrder] = function(oClass, value){oClass.order = value;}; drawingsChangesMap[AscDFH.historyitem_PieSeries_SetOrder] = function(oClass, value){oClass.order = value;};
...@@ -342,7 +340,6 @@ function (window, undefined) { ...@@ -342,7 +340,6 @@ function (window, undefined) {
drawingsChangesMap[AscDFH.historyitem_RadarChart_SetVaryColors] = function(oClass, value){oClass.varyColors = value;}; drawingsChangesMap[AscDFH.historyitem_RadarChart_SetVaryColors] = function(oClass, value){oClass.varyColors = value;};
drawingsChangesMap[AscDFH.historyitem_RadarSeries_SetCat] = function(oClass, value){oClass.cat = value;}; drawingsChangesMap[AscDFH.historyitem_RadarSeries_SetCat] = function(oClass, value){oClass.cat = value;};
drawingsChangesMap[AscDFH.historyitem_RadarSeries_SetDLbls] = function(oClass, value){oClass.dLbls = value;}; drawingsChangesMap[AscDFH.historyitem_RadarSeries_SetDLbls] = function(oClass, value){oClass.dLbls = value;};
drawingsChangesMap[AscDFH.historyitem_RadarSeries_SetDPt] = function(oClass, value){oClass.dPt = value;};
drawingsChangesMap[AscDFH.historyitem_RadarSeries_SetIdx] = function(oClass, value){oClass.idx = value;}; drawingsChangesMap[AscDFH.historyitem_RadarSeries_SetIdx] = function(oClass, value){oClass.idx = value;};
drawingsChangesMap[AscDFH.historyitem_RadarSeries_SetMarker] = function(oClass, value){oClass.marker = value;}; drawingsChangesMap[AscDFH.historyitem_RadarSeries_SetMarker] = function(oClass, value){oClass.marker = value;};
drawingsChangesMap[AscDFH.historyitem_RadarSeries_SetOrder] = function(oClass, value){oClass.order = value;}; drawingsChangesMap[AscDFH.historyitem_RadarSeries_SetOrder] = function(oClass, value){oClass.order = value;};
...@@ -358,7 +355,7 @@ function (window, undefined) { ...@@ -358,7 +355,7 @@ function (window, undefined) {
drawingsChangesMap[AscDFH.historyitem_ScatterChart_SetScatterStyle] = function(oClass, value){oClass.scatterStyle = value;}; drawingsChangesMap[AscDFH.historyitem_ScatterChart_SetScatterStyle] = function(oClass, value){oClass.scatterStyle = value;};
drawingsChangesMap[AscDFH.historyitem_ScatterChart_SetVaryColors] = function(oClass, value){oClass.varyColors = value;}; drawingsChangesMap[AscDFH.historyitem_ScatterChart_SetVaryColors] = function(oClass, value){oClass.varyColors = value;};
drawingsChangesMap[AscDFH.historyitem_ScatterSer_SetDLbls] = function(oClass, value){oClass.dLbls = value;}; drawingsChangesMap[AscDFH.historyitem_ScatterSer_SetDLbls] = function(oClass, value){oClass.dLbls = value;};
drawingsChangesMap[AscDFH.historyitem_ScatterSer_SetDPt] = function(oClass, value){oClass.dPt = value;};
drawingsChangesMap[AscDFH.historyitem_ScatterSer_SetErrBars] = function(oClass, value){oClass.errBars = value;}; drawingsChangesMap[AscDFH.historyitem_ScatterSer_SetErrBars] = function(oClass, value){oClass.errBars = value;};
drawingsChangesMap[AscDFH.historyitem_ScatterSer_SetIdx] = function(oClass, value){oClass.idx = value;}; drawingsChangesMap[AscDFH.historyitem_ScatterSer_SetIdx] = function(oClass, value){oClass.idx = value;};
drawingsChangesMap[AscDFH.historyitem_ScatterSer_SetMarker] = function(oClass, value){oClass.marker = value;}; drawingsChangesMap[AscDFH.historyitem_ScatterSer_SetMarker] = function(oClass, value){oClass.marker = value;};
...@@ -709,7 +706,7 @@ function (window, undefined) { ...@@ -709,7 +706,7 @@ function (window, undefined) {
AscDFH.changesFactory[AscDFH.historyitem_BubbleChart_SetDLbls ] = window['AscDFH'].CChangesDrawingsObject; AscDFH.changesFactory[AscDFH.historyitem_BubbleChart_SetDLbls ] = window['AscDFH'].CChangesDrawingsObject;
AscDFH.changesFactory[AscDFH.historyitem_BubbleSeries_SetBubbleSize ] = window['AscDFH'].CChangesDrawingsObject; AscDFH.changesFactory[AscDFH.historyitem_BubbleSeries_SetBubbleSize ] = window['AscDFH'].CChangesDrawingsObject;
AscDFH.changesFactory[AscDFH.historyitem_BubbleSeries_SetDLbls ] = window['AscDFH'].CChangesDrawingsObject; AscDFH.changesFactory[AscDFH.historyitem_BubbleSeries_SetDLbls ] = window['AscDFH'].CChangesDrawingsObject;
AscDFH.changesFactory[AscDFH.historyitem_BubbleSeries_SetDPt ] = window['AscDFH'].CChangesDrawingsObject; AscDFH.changesFactory[AscDFH.historyitem_BubbleSeries_SetDPt ] = window['AscDFH'].CChangesDrawingsContent;
AscDFH.changesFactory[AscDFH.historyitem_BubbleSeries_SetErrBars ] = window['AscDFH'].CChangesDrawingsObject; AscDFH.changesFactory[AscDFH.historyitem_BubbleSeries_SetErrBars ] = window['AscDFH'].CChangesDrawingsObject;
AscDFH.changesFactory[AscDFH.historyitem_BubbleSeries_SetSpPr ] = window['AscDFH'].CChangesDrawingsObject; AscDFH.changesFactory[AscDFH.historyitem_BubbleSeries_SetSpPr ] = window['AscDFH'].CChangesDrawingsObject;
AscDFH.changesFactory[AscDFH.historyitem_BubbleSeries_SetTrendline ] = window['AscDFH'].CChangesDrawingsObject; AscDFH.changesFactory[AscDFH.historyitem_BubbleSeries_SetTrendline ] = window['AscDFH'].CChangesDrawingsObject;
...@@ -787,7 +784,7 @@ function (window, undefined) { ...@@ -787,7 +784,7 @@ function (window, undefined) {
AscDFH.changesFactory[AscDFH.historyitem_Scaling_SetParent ] = window['AscDFH'].CChangesDrawingsObject; AscDFH.changesFactory[AscDFH.historyitem_Scaling_SetParent ] = window['AscDFH'].CChangesDrawingsObject;
AscDFH.changesFactory[AscDFH.historyitem_ScatterChart_SetDLbls ] = window['AscDFH'].CChangesDrawingsObject; AscDFH.changesFactory[AscDFH.historyitem_ScatterChart_SetDLbls ] = window['AscDFH'].CChangesDrawingsObject;
AscDFH.changesFactory[AscDFH.historyitem_ScatterSer_SetDLbls ] = window['AscDFH'].CChangesDrawingsObject; AscDFH.changesFactory[AscDFH.historyitem_ScatterSer_SetDLbls ] = window['AscDFH'].CChangesDrawingsObject;
AscDFH.changesFactory[AscDFH.historyitem_ScatterSer_SetDPt ] = window['AscDFH'].CChangesDrawingsObject; AscDFH.changesFactory[AscDFH.historyitem_ScatterSer_SetDPt ] = window['AscDFH'].CChangesDrawingsContent;
AscDFH.changesFactory[AscDFH.historyitem_ScatterSer_SetErrBars ] = window['AscDFH'].CChangesDrawingsObject; AscDFH.changesFactory[AscDFH.historyitem_ScatterSer_SetErrBars ] = window['AscDFH'].CChangesDrawingsObject;
AscDFH.changesFactory[AscDFH.historyitem_ScatterSer_SetMarker ] = window['AscDFH'].CChangesDrawingsObject; AscDFH.changesFactory[AscDFH.historyitem_ScatterSer_SetMarker ] = window['AscDFH'].CChangesDrawingsObject;
AscDFH.changesFactory[AscDFH.historyitem_ScatterSer_SetSpPr ] = window['AscDFH'].CChangesDrawingsObject; AscDFH.changesFactory[AscDFH.historyitem_ScatterSer_SetSpPr ] = window['AscDFH'].CChangesDrawingsObject;
...@@ -908,6 +905,11 @@ function (window, undefined) { ...@@ -908,6 +905,11 @@ function (window, undefined) {
drawingContentChanges[AscDFH.historyitem_BarSeries_SetDPt] = drawingContentChanges[AscDFH.historyitem_BarSeries_SetDPt] =
drawingContentChanges[AscDFH.historyitem_LineSeries_SetDPt] = drawingContentChanges[AscDFH.historyitem_LineSeries_SetDPt] =
drawingContentChanges[AscDFH.historyitem_PieSeries_SetDPt] = drawingContentChanges[AscDFH.historyitem_PieSeries_SetDPt] =
drawingContentChanges[AscDFH.historyitem_ScatterSer_SetDPt] =
drawingContentChanges[AscDFH.historyitem_BubbleSeries_SetDPt] =
drawingContentChanges[AscDFH.historyitem_RadarSeries_SetDPt] =
drawingContentChanges[AscDFH.historyitem_PieSeries_SetDPt] =
drawingContentChanges[AscDFH.historyitem_LineSeries_SetDPt] =
drawingContentChanges[AscDFH.historyitem_RadarSeries_SetDPt] = function(oClass){return oClass.dPt;}; drawingContentChanges[AscDFH.historyitem_RadarSeries_SetDPt] = function(oClass){return oClass.dPt;};
drawingContentChanges[AscDFH.historyitem_DLbls_SetDLbl] = function(oClass){return oClass.dLbl;}; drawingContentChanges[AscDFH.historyitem_DLbls_SetDLbl] = function(oClass){return oClass.dLbl;};
...@@ -6238,7 +6240,7 @@ CBubbleSeries.prototype = ...@@ -6238,7 +6240,7 @@ CBubbleSeries.prototype =
}, },
addDPt: function(pr) addDPt: function(pr)
{ {
History.Add(new CChangesDrawingsObject(this, AscDFH.historyitem_BubbleSeries_SetDPt, this.dPt.length, [pr], true)); History.Add(new CChangesDrawingsContent(this, AscDFH.historyitem_BubbleSeries_SetDPt, this.dPt.length, [pr], true));
this.dPt.push(pr); this.dPt.push(pr);
}, },
setErrBars: function(pr) setErrBars: function(pr)
...@@ -10906,7 +10908,9 @@ CScatterSeries.prototype = ...@@ -10906,7 +10908,9 @@ CScatterSeries.prototype =
}, },
addDPt: function(pr) addDPt: function(pr)
{ {
History.Add(new CChangesDrawingsObject(this, AscDFH.historyitem_ScatterSer_SetDPt, this.dPt, pr));
History.Add(new CChangesDrawingsContent(this, AscDFH.historyitem_ScatterSer_SetDPt, this.dPt.length, [pr], true));
//History.Add(new CChangesDrawingsObject(this, AscDFH.historyitem_ScatterSer_SetDPt, this.dPt, pr));
this.dPt.push(pr); this.dPt.push(pr);
}, },
setErrBars: function(pr) setErrBars: function(pr)
......
...@@ -1938,23 +1938,17 @@ function CEditorPage(api) ...@@ -1938,23 +1938,17 @@ function CEditorPage(api)
} }
// Webkit // Webkit
if (e.wheelDeltaY !== undefined) if (undefined !== e.wheelDeltaY && 0 !== e.wheelDeltaY)
{
if (e.wheelDelta != 0)
{ {
//deltaY = (e.wheelDeltaY > 0) ? -45 : 45; //deltaY = (e.wheelDeltaY > 0) ? -45 : 45;
deltaY = -45 * e.wheelDeltaY / 120; deltaY = -45 * e.wheelDeltaY / 120;
} }
} if (undefined !== e.wheelDeltaX && 0 !== e.wheelDeltaX)
if (e.wheelDeltaX !== undefined)
{
if (e.wheelDeltaX != 0)
{ {
//deltaX = (e.wheelDeltaX > 0) ? -45 : 45; //deltaX = (e.wheelDeltaX > 0) ? -45 : 45;
deltaX = -45 * e.wheelDeltaX / 120; deltaX = -45 * e.wheelDeltaX / 120;
} }
} }
}
deltaX >>= 0; deltaX >>= 0;
deltaY >>= 0; deltaY >>= 0;
......
...@@ -1981,23 +1981,17 @@ function CEditorPage(api) ...@@ -1981,23 +1981,17 @@ function CEditorPage(api)
} }
// Webkit // Webkit
if (e.wheelDeltaY !== undefined) if (undefined !== e.wheelDeltaY && 0 !== e.wheelDeltaY)
{
if (e.wheelDelta != 0)
{ {
//deltaY = (e.wheelDeltaY > 0) ? -45 : 45; //deltaY = (e.wheelDeltaY > 0) ? -45 : 45;
deltaY = -45 * e.wheelDeltaY / 120; deltaY = -45 * e.wheelDeltaY / 120;
} }
} if (undefined !== e.wheelDeltaX && 0 !== e.wheelDeltaX)
if (e.wheelDeltaX !== undefined)
{
if (e.wheelDeltaX != 0)
{ {
//deltaX = (e.wheelDeltaX > 0) ? -45 : 45; //deltaX = (e.wheelDeltaX > 0) ? -45 : 45;
deltaX = -45 * e.wheelDeltaX / 120; deltaX = -45 * e.wheelDeltaX / 120;
} }
} }
}
deltaX >>= 0; deltaX >>= 0;
deltaY >>= 0; deltaY >>= 0;
......
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