mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 06:08:33 +08:00
Apply first texture when filling shape/slide/textart
This commit is contained in:
@ -226,7 +226,18 @@ define([
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_BLIP:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
|
||||
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
|
||||
var props = new Asc.asc_CShapeProperty();
|
||||
var fill = new Asc.asc_CShapeFill();
|
||||
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
|
||||
fill.put_fill( new Asc.asc_CFillBlip());
|
||||
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
|
||||
fill.get_fill().put_texture_id(this._texturearray[0].type);
|
||||
props.put_fill(fill);
|
||||
this.imgprops.put_ShapeProperties(props);
|
||||
this.api.ImgApply(this.imgprops);
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_PATT:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
||||
|
||||
@ -214,7 +214,17 @@ define([
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_BLIP:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
|
||||
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
|
||||
var props = new Asc.asc_CShapeProperty();
|
||||
var fill = new Asc.asc_CShapeFill();
|
||||
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
|
||||
fill.put_fill( new Asc.asc_CFillBlip());
|
||||
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
|
||||
fill.get_fill().put_texture_id(this._texturearray[0].type);
|
||||
props.put_fill(fill);
|
||||
this.api.ShapeApply(props);
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_PATT:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
||||
|
||||
@ -202,7 +202,18 @@ define([
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_BLIP:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
|
||||
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
|
||||
var props = new Asc.asc_TextArtProperties();
|
||||
var fill = new Asc.asc_CShapeFill();
|
||||
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
|
||||
fill.put_fill( new Asc.asc_CFillBlip());
|
||||
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
|
||||
fill.get_fill().put_texture_id(this._texturearray[0].type);
|
||||
props.asc_putFill(fill);
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
this.api.ShapeApply(this.shapeprops);
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_PATT:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
||||
|
||||
@ -214,7 +214,17 @@ define([
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_BLIP:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
|
||||
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
|
||||
var props = new Asc.asc_CShapeProperty();
|
||||
var fill = new Asc.asc_CShapeFill();
|
||||
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
|
||||
fill.put_fill( new Asc.asc_CFillBlip());
|
||||
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
|
||||
fill.get_fill().put_texture_id(this._texturearray[0].type);
|
||||
props.put_fill(fill);
|
||||
this.api.ShapeApply(props);
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_PATT:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
||||
|
||||
@ -313,7 +313,17 @@ define([
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_BLIP:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
|
||||
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
|
||||
var props = new Asc.CAscSlideProps();
|
||||
var fill = new Asc.asc_CShapeFill();
|
||||
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
|
||||
fill.put_fill( new Asc.asc_CFillBlip());
|
||||
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
|
||||
fill.get_fill().put_texture_id(this._texturearray[0].type);
|
||||
props.put_background(fill);
|
||||
this.api.SetSlideProps(props);
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_PATT:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
||||
|
||||
@ -202,7 +202,18 @@ define([
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_BLIP:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
|
||||
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
|
||||
var props = new Asc.asc_TextArtProperties();
|
||||
var fill = new Asc.asc_CShapeFill();
|
||||
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
|
||||
fill.put_fill( new Asc.asc_CFillBlip());
|
||||
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
|
||||
fill.get_fill().put_texture_id(this._texturearray[0].type);
|
||||
props.asc_putFill(fill);
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
this.api.ShapeApply(this.shapeprops);
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_PATT:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
||||
|
||||
@ -217,7 +217,18 @@ define([
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_BLIP:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
|
||||
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
|
||||
var props = new Asc.asc_CShapeProperty();
|
||||
var fill = new Asc.asc_CShapeFill();
|
||||
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
|
||||
fill.asc_putFill( new Asc.asc_CFillBlip());
|
||||
fill.asc_getFill().asc_putType(Asc.c_oAscFillBlipType.TILE);
|
||||
fill.asc_getFill().asc_putTextureId(this._texturearray[0].type);
|
||||
props.asc_putFill(fill);
|
||||
this.imgprops.asc_putShapeProperties(props);
|
||||
this.api.asc_setGraphicObjectProps(this.imgprops);
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_PATT:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
||||
|
||||
@ -203,7 +203,18 @@ define([
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_BLIP:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
|
||||
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
|
||||
var props = new Asc.asc_TextArtProperties();
|
||||
var fill = new Asc.asc_CShapeFill();
|
||||
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
|
||||
fill.asc_putFill( new Asc.asc_CFillBlip());
|
||||
fill.asc_getFill().asc_putType(Asc.c_oAscFillBlipType.TILE);
|
||||
fill.asc_getFill().asc_putTextureId(this._texturearray[0].type);
|
||||
props.asc_putFill(fill);
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
this.api.asc_setGraphicObjectProps(this.imgprops);
|
||||
}
|
||||
break;
|
||||
case Asc.c_oAscFill.FILL_TYPE_PATT:
|
||||
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
||||
|
||||
Reference in New Issue
Block a user