@@ -33011,7 +33011,7 @@ OG.graph.Canvas.prototype = {
3301133011 });
3301233012 sliderBar.css({
3301333013 position: 'relative',
33014- 'writing-mode': 'bt-lr', /* IE */
33014+ // 'writing-mode': 'bt-lr', /* IE */
3301533015 'width': '100%',
3301633016 'height': '8px'
3301733017 });
@@ -34423,6 +34423,8 @@ OG.graph.Canvas.prototype = {
3442334423 fromEdge, toEdge, label, fromLabel, toLabel, angle, value, data, dataExt, element, loopType, taskType, swimlane, textList;
3442434424
3442534425 this._RENDERER.clear();
34426+ var renderer = this._RENDERER;
34427+ $(renderer._PAPER.canvas).trigger('loading', ['start']);
3442634428
3442734429 if (json && json.opengraph && json.opengraph.cell && OG.Util.isArray(json.opengraph.cell)) {
3442834430 canvasWidth = json.opengraph['@width'];
@@ -34447,6 +34449,9 @@ OG.graph.Canvas.prototype = {
3444734449 }
3444834450
3444934451 cell = json.opengraph.cell;
34452+ var totalCount = cell.length;
34453+ var cellCount = 0;
34454+
3445034455 for (var i = 0, leni = cell.length; i < leni; i++) {
3445134456 id = cell[i]['@id'];
3445234457 parent = cell[i]['@parent'];
@@ -34595,9 +34600,13 @@ OG.graph.Canvas.prototype = {
3459534600 if (dataExt) {
3459634601 element.dataExt = OG.JSON.decode(unescape(dataExt));
3459734602 }
34603+
34604+ cellCount++;
34605+ $(renderer._PAPER.canvas).trigger('loading', [Math.round((cellCount/totalCount)*100)]);
3459834606 }
3459934607
3460034608 this.fastLoadingOFF();
34609+ $(renderer._PAPER.canvas).trigger('loading', ['end']);
3460134610
3460234611 return {
3460334612 width: maxX - minX,
@@ -34610,6 +34619,7 @@ OG.graph.Canvas.prototype = {
3461034619 }
3461134620
3461234621 this.fastLoadingOFF();
34622+ $(renderer._PAPER.canvas).trigger('loading', ['end']);
3461334623
3461434624 return {
3461534625 width: 0,
@@ -34947,6 +34957,15 @@ OG.graph.Canvas.prototype = {
3494734957 $(this.getRootElement()).bind('expanded', function (event, element) {
3494834958 callbackFunc(event, element);
3494934959 });
34960+ },
34961+
34962+ /**
34963+ * 캔버스 로딩 이벤트 리스너
34964+ */
34965+ onLoading: function(callbackFunc){
34966+ $(this.getRootElement()).bind('loading', function (event, progress) {
34967+ callbackFunc(event, progress);
34968+ });
3495034969 }
3495134970}
3495234971;
0 commit comments