Merge pull request #37 from ONLYOFFICE/feature/v5.0.6-developer

Fixed opening in the developer mode.
This commit is contained in:
Alexander Trofimov 2017-12-07 11:08:14 +03:00 committed by GitHub
commit 3f139ede4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 6 deletions

View file

@ -367,8 +367,9 @@ define([
} }
this.developerHint.toggleClass('hidden', !mode); this.developerHint.toggleClass('hidden', !mode);
var lastbtn = this.$el.find('button.btn-category:visible:last-of-type'); var btns = this.$el.find('button.btn-category:visible'),
this.minDevPosition = lastbtn.offset().top - lastbtn.offsetParent().offset().top + lastbtn.height() + 20; lastbtn = (btns.length>0) ? $(btns[btns.length-1]) : null;
this.minDevPosition = (lastbtn) ? (lastbtn.offset().top - lastbtn.offsetParent().offset().top + lastbtn.height() + 20) : 20;
this.onWindowResize(); this.onWindowResize();
}, },

View file

@ -364,8 +364,9 @@ define([
} }
this.developerHint.toggleClass('hidden', !mode); this.developerHint.toggleClass('hidden', !mode);
var lastbtn = this.$el.find('button.btn-category:visible:last-of-type'); var btns = this.$el.find('button.btn-category:visible'),
this.minDevPosition = lastbtn.offset().top - lastbtn.offsetParent().offset().top + lastbtn.height() + 20; lastbtn = (btns.length>0) ? $(btns[btns.length-1]) : null;
this.minDevPosition = (lastbtn) ? (lastbtn.offset().top - lastbtn.offsetParent().offset().top + lastbtn.height() + 20) : 20;
this.onWindowResize(); this.onWindowResize();
}, },

View file

@ -336,8 +336,9 @@ define([
} }
this.developerHint.toggleClass('hidden', !mode); this.developerHint.toggleClass('hidden', !mode);
var lastbtn = this.$el.find('button.btn-category:visible:last-of-type'); var btns = this.$el.find('button.btn-category:visible'),
this.minDevPosition = lastbtn.offset().top - lastbtn.offsetParent().offset().top + lastbtn.height() + 20; lastbtn = (btns.length>0) ? $(btns[btns.length-1]) : null;
this.minDevPosition = (lastbtn) ? (lastbtn.offset().top - lastbtn.offsetParent().offset().top + lastbtn.height() + 20) : 20;
this.onWindowResize(); this.onWindowResize();
}, },