|
|
@@ -23,6 +23,7 @@ var Whiteboard = (function () {
|
|
23
|
23
|
this.isFullscreen = false;
|
|
24
|
24
|
this.pages = [];
|
|
25
|
25
|
this.isInitialized = false;
|
|
|
26
|
+ this.isSyncing = false;
|
|
26
|
27
|
this.visiblePageIndex = 0;
|
|
27
|
28
|
if (target) {
|
|
28
|
29
|
this.target = target;
|
|
|
@@ -207,10 +208,10 @@ var Whiteboard = (function () {
|
|
207
|
208
|
Whiteboard.prototype.onSnapshot = function (snap) {
|
|
208
|
209
|
var _this = this;
|
|
209
|
210
|
var id = snap.id, sources = snap.sources, pageIds = snap.pageIds, visiblePageIndex = snap.visiblePageIndex;
|
|
210
|
|
- if (!this.isInitialized) {
|
|
|
211
|
+ if (!this.isInitialized && !this.isSyncing) {
|
|
211
|
212
|
this.id = id;
|
|
212
|
213
|
this.sources = sources;
|
|
213
|
|
- this.initSiema();
|
|
|
214
|
+ this.isSyncing = true;
|
|
214
|
215
|
this.sources.forEach(function (source, i) {
|
|
215
|
216
|
var page = new index_1.WhitePage({ imgSrc: source }, {
|
|
216
|
217
|
mode: _this.mode,
|
|
|
@@ -222,8 +223,10 @@ var Whiteboard = (function () {
|
|
222
|
223
|
_this.pages.push(page);
|
|
223
|
224
|
page.open();
|
|
224
|
225
|
});
|
|
|
226
|
+ this.initSiema();
|
|
225
|
227
|
}
|
|
226
|
228
|
this.isInitialized = true;
|
|
|
229
|
+ this.isSyncing = false;
|
|
227
|
230
|
this.onPageChange(visiblePageIndex);
|
|
228
|
231
|
};
|
|
229
|
232
|
return Whiteboard;
|