Merge pull request #829 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2021-04-22 17:16:57 +03:00 committed by GitHub
commit d7ee56626a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 62 additions and 49 deletions

View file

@ -89,7 +89,8 @@ define([
GradColor: '000000',
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
FormId: null,
DisabledControls: false
DisabledControls: false,
applicationPixelRatio: Common.Utils.applicationPixelRatio()
};
this.lockedControls = [];
this._locked = false;
@ -121,6 +122,8 @@ define([
this.FillColorContainer = $('#textart-panel-color-fill');
this.FillGradientContainer = $('#textart-panel-gradient-fill');
this.TransparencyContainer = $('#textart-panel-transparent-fill');
$(window).on('resize', _.bind(this.onWindowResize, this));
},
setApi: function(api) {
@ -1126,22 +1129,17 @@ define([
},
fillTransform: function(transforms) {
if (transforms && transforms.length>1 && transforms[1]){
var me = this,
artStore = [],
arrTransforms = transforms[1];
for (var i=0; i<arrTransforms.length; i++) {
var arr = arrTransforms[i];
if (arr && arr.length>0)
_.each(arr, function(item){
artStore.push({
imageUrl: item.Image,
type : item.Type,
selected: false
});
});
if (transforms){
var artStore = [];
for (var i=0; i<transforms.length; i++) {
var item = transforms[i];
artStore.push({
imageUrl: item.Image,
type : item.Type,
selected: false
});
}
this.cmbTransform.menuPicker.store.add(artStore);
this.cmbTransform.menuPicker.store.reset(artStore);
if (this.cmbTransform.menuPicker.store.length > 0) {
this.cmbTransform.fillComboView(this.cmbTransform.menuPicker.store.at(0),true);
}
@ -1294,6 +1292,13 @@ define([
}
},
onWindowResize: function() {
if (!this._initSettings && this._state.applicationPixelRatio !== Common.Utils.applicationPixelRatio())
this.fillTransform(this.api.asc_getPropertyEditorTextArts());
this._state.applicationPixelRatio = Common.Utils.applicationPixelRatio();
},
txtNoBorders : 'No Line',
strStroke : 'Stroke',
strColor : 'Color',

View file

@ -1695,7 +1695,7 @@ define([
// set menus
var me = this;
var levelTemplate = _.template('<a id="<%= id %>" tabindex="-1" type="menuitem"><div id="<%= options.previewId %>" class="menu-list-preview" style="width: 160px; height: 30px;"></div></a>');
var levelTemplate = _.template('<a id="<%= id %>" tabindex="-1" type="menuitem"><div id="<%= options.previewId %>" class="menu-list-preview" style="width: 200px; height: 30px;"></div></a>');
var items = [], ids = [];
for (var i=0; i<9; i++) {
ids.push('id-toolbar-menu-markers-level-' + i);

View file

@ -93,7 +93,8 @@ define([
GradColor: '000000',
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
FormId: null,
DisabledControls: false
DisabledControls: false,
applicationPixelRatio: Common.Utils.applicationPixelRatio()
};
this.lockedControls = [];
this._locked = false;
@ -134,6 +135,7 @@ define([
el.html(this.template({
scope: this
}));
$(window).on('resize', _.bind(this.onWindowResize, this));
},
setApi: function(api) {
@ -1538,22 +1540,17 @@ define([
},
fillTransform: function(transforms) {
if (transforms && transforms.length>1 && transforms[1]){
var me = this,
artStore = [],
arrTransforms = transforms[1];
for (var i=0; i<arrTransforms.length; i++) {
var arr = arrTransforms[i];
if (arr && arr.length>0)
_.each(arr, function(item){
artStore.push({
imageUrl: item.Image,
type : item.Type,
selected: false
});
});
if (transforms){
var artStore = [];
for (var i=0; i<transforms.length; i++) {
var item = transforms[i];
artStore.push({
imageUrl: item.Image,
type : item.Type,
selected: false
});
}
this.cmbTransform.menuPicker.store.add(artStore);
this.cmbTransform.menuPicker.store.reset(artStore);
if (this.cmbTransform.menuPicker.store.length > 0) {
this.cmbTransform.fillComboView(this.cmbTransform.menuPicker.store.at(0),true);
}
@ -1727,6 +1724,13 @@ define([
}
},
onWindowResize: function() {
if (!this._initSettings && this._state.applicationPixelRatio !== Common.Utils.applicationPixelRatio())
this.fillTransform(this.api.asc_getPropertyEditorTextArts());
this._state.applicationPixelRatio = Common.Utils.applicationPixelRatio();
},
txtNoBorders : 'No Line',
strStroke : 'Stroke',
strColor : 'Color',

View file

@ -94,7 +94,8 @@ define([
GradColor: '000000',
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
FormId: null,
DisabledControls: false
DisabledControls: false,
applicationPixelRatio: Common.Utils.applicationPixelRatio()
};
this.lockedControls = [];
this._locked = false;
@ -135,6 +136,7 @@ define([
el.html(this.template({
scope: this
}));
$(window).on('resize', _.bind(this.onWindowResize, this));
},
setApi: function(api) {
@ -1543,22 +1545,17 @@ define([
},
fillTransform: function(transforms) {
if (transforms && transforms.length>1 && transforms[1]){
var me = this,
artStore = [],
arrTransforms = transforms[1];
for (var i=0; i<arrTransforms.length; i++) {
var arr = arrTransforms[i];
if (arr && arr.length>0)
_.each(arr, function(item){
artStore.push({
imageUrl: item.Image,
type : item.Type,
selected: false
});
});
if (transforms){
var artStore = [];
for (var i=0; i<transforms.length; i++) {
var item = transforms[i];
artStore.push({
imageUrl: item.Image,
type : item.Type,
selected: false
});
}
this.cmbTransform.menuPicker.store.add(artStore);
this.cmbTransform.menuPicker.store.reset(artStore);
if (this.cmbTransform.menuPicker.store.length > 0) {
this.cmbTransform.fillComboView(this.cmbTransform.menuPicker.store.at(0),true);
}
@ -1730,6 +1727,13 @@ define([
}
},
onWindowResize: function() {
if (!this._initSettings && this._state.applicationPixelRatio !== Common.Utils.applicationPixelRatio())
this.fillTransform(this.api.asc_getPropertyEditorTextArts());
this._state.applicationPixelRatio = Common.Utils.applicationPixelRatio();
},
txtNoBorders : 'No Line',
strStroke : 'Stroke',
strColor : 'Color',