本次改造基于V7.1.1进行,已经更新进入docker。
这部分东西需要付费购买,请加我的wei:cao_rui_jian_xiong
项目核心sdk_all.js等全部改造为明文,可以方便阅读和二次开发
下面是改造后的代码截取。
(function (window, undefined) {
(function (window) {
var MAX_ACTION_TIME = 20;
var TIMEOUT_TIME = 20;
function CActionOnTimerBase() {
this.TimerId = null;
this.Start = false;
this.FirstActionOnTimer = false;
}
CActionOnTimerBase.prototype.Begin = function () {
if (this.Start) this.End();
this.Start = true;
this.OnBegin.apply(this, arguments);
var oThis = this;
if (this.FirstActionOnTimer)
this.TimerId = setTimeout(function () {
oThis.Continue();
}, TIMEOUT_TIME);
else this.Continue();
};
CActionOnTimerBase.prototype.Continue = function () {
if (this.IsContinue()) {
var nTime = performance.now();
this.OnStartTimer();
while (this.IsContinue()) {
if (performance.now() - nTime > MAX_ACTION_TIME) break;
this.DoAction();
}
this.OnEndTimer();
}
var oThis = this;
if (this.IsContinue())
this.TimerId = setTimeout(function () {
oThis.Continue();
}, TIMEOUT_TIME);
else this.End();
};
CActionOnTimerBase.prototype.End = function () {
this.Reset();
if (this.Start) {
this.Start = false;
this.OnEnd();
}
};
CActionOnTimerBase.prototype.Reset = function () {
if (this.TimerId) clearTimeout(this.TimerId);
this.TimerId = null;
this.Index = -1;
};
CActionOnTimerBase.prototype.SetDoFirstActionOnTimer = function (
isOnTimer
) {
this.FirstActionOnTimer = isOnTimer;
};
CActionOnTimerBase.prototype.OnBegin = function () {};
CActionOnTimerBase.prototype.OnEnd = function () {};
CActionOnTimerBase.prototype.IsContinue = function () {
服务器托管网 return false;
};
CActionOnTimerBase.prototype.OnStartTimer = function () {};
CActionOnTimerBase.prototype.DoAction = function () {};
CActionOnTimerBase.prototype.OnEndTimer = function () {};
window["AscCommon"] = window["AscCommon"] || {};
window["AscCommon"].CActionOnTimerBase = CActionOnTimerBase;
})(window);
("use strict");
(function (window) {
var g_oCanvas = null;
var g_oTable = null;
function GetCanvas() {
if (g_oCanvas == null) {
g_oCanvas = document.createElement("canvas");
g_oCanvas.width =
(TABLE_STYLE_WIDTH_PIX * AscCommon.AscBrowser.retinaPixelRatio) >> 0;
g_oCanvas.height服务器托管网 =
(TABLE_STYLE_HEIGHT_PIX * AscCommon.AscBrowser.retinaPixelRatio) >> 0;
}
return g_oCanvas;
}
function GetTable(oLogicDocument) {
if (g_oTable == null) g_oTable = oLogicDocument.GetTableForPreview();
oLogicDocument.CheckTableForPreview(g_oTable);
return g_oTable;
}
function CTableStylesPreviewGenerator(oLogicDocument) {
AscCommon.CActionOnTimerBase.call(this);
this.FirstActionOnTimer = true;
this.Api = oLogicDocument.GetApi();
this.LogicDocument = oLogicDocument;
this.DrawingDocument = oLogicDocument.GetDrawingDocument();
this.TableStyles = [];
this.TableLook = null;
this.Index = -1;
this.Buffer = [];
}
CTableStylesPreviewGenerator.prototype = Object.create(
AscCommon.CActionOnTimerBase.prototype
);
CTableStylesPreviewGenerator.prototype.constructor =
CTableStylesPreviewGenerator;
CTableStylesPreviewGenerator.prototype.OnBegin = function (
isDefaultTableLook
) {
this.TableStyles = this.LogicDocument.GetAllTableStyles();
this.Index = -1;
this.TableLook = this.DrawingDocument.GetTableLook(isDefaultTableLook);
this.Api.sendEvent(
"asc_onBeginTableStylesPreview",
this.TableStyles.length
);
};
CTableStylesPreviewGenerator.prototype.OnEnd = function () {
this.Api.sendEvent("asc_onEndTableStylesPreview");
};
CTableStylesPreviewGenerator.prototype.IsContinue = function () {
return this.Index
解析前的代码还是很难读懂的。
明文解析后,增加了原生API的调用
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
相关推荐: Serverless 数仓技术与挑战 – 张雁飞|3306π
09月16日(本周六)下午,Databend Labs联合创始人张雁飞将作为嘉宾参与由 3306 组织的「 3306 数据库朋友圈」主题分享。 在本次分享中,我们将介绍一款新型 Serverless 数仓技术。该技术旨在解决传统数仓在扩展性、成本和管理上的局限…