Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
web-apps
Commits
d7e63930
Commit
d7e63930
authored
Jul 01, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PE][SSE] Shape/TextArt Settings: add stroke-line type.
parent
8384f21f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
213 additions
and
10 deletions
+213
-10
apps/presentationeditor/main/app/template/ShapeSettings.template
...esentationeditor/main/app/template/ShapeSettings.template
+8
-0
apps/presentationeditor/main/app/template/TextArtSettings.template
...entationeditor/main/app/template/TextArtSettings.template
+8
-0
apps/presentationeditor/main/app/view/ShapeSettings.js
apps/presentationeditor/main/app/view/ShapeSettings.js
+44
-3
apps/presentationeditor/main/app/view/TextArtSettings.js
apps/presentationeditor/main/app/view/TextArtSettings.js
+44
-2
apps/presentationeditor/main/locale/en.json
apps/presentationeditor/main/locale/en.json
+2
-0
apps/spreadsheeteditor/main/app/template/ShapeSettings.template
...preadsheeteditor/main/app/template/ShapeSettings.template
+8
-0
apps/spreadsheeteditor/main/app/template/TextArtSettings.template
...eadsheeteditor/main/app/template/TextArtSettings.template
+8
-0
apps/spreadsheeteditor/main/app/view/ShapeSettings.js
apps/spreadsheeteditor/main/app/view/ShapeSettings.js
+45
-3
apps/spreadsheeteditor/main/app/view/TextArtSettings.js
apps/spreadsheeteditor/main/app/view/TextArtSettings.js
+44
-2
apps/spreadsheeteditor/main/locale/en.json
apps/spreadsheeteditor/main/locale/en.json
+2
-0
No files found.
apps/presentationeditor/main/app/template/ShapeSettings.template
View file @
d7e63930
...
...
@@ -108,6 +108,14 @@
</div>
</td>
</tr>
<tr>
<td class="padding-small">
<div style="display:inline-block;width:100px;vertical-align: middle;">
<label class="input-label" style=""><%= scope.strType %></label>
<div id="shape-combo-border-type" style="width: 93px;"></div>
</div>
</td>
</tr>
<tr class="shape-only">
<td class="padding-small"></td>
</tr>
...
...
apps/presentationeditor/main/app/template/TextArtSettings.template
View file @
d7e63930
...
...
@@ -123,6 +123,14 @@
</div>
</td>
</tr>
<tr>
<td class="padding-small">
<div style="display:inline-block;width:100px;vertical-align: middle;">
<label class="input-label" style=""><%= scope.strType %></label>
<div id="textart-combo-border-type" style="width: 93px;"></div>
</div>
</td>
</tr>
<tr>
<td class="padding-small">
<div class="separator horizontal"></div>
...
...
apps/presentationeditor/main/app/view/ShapeSettings.js
View file @
d7e63930
...
...
@@ -88,6 +88,7 @@ define([
StrokeType
:
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
,
StrokeWidth
:
this
.
_pt2mm
(
1
),
StrokeColor
:
'
000000
'
,
StrokeBorderType
:
Asc
.
c_oDashType
.
solid
,
FGColor
:
'
000000
'
,
BGColor
:
'
ffffff
'
,
GradColor
:
'
000000
'
,
...
...
@@ -113,6 +114,7 @@ define([
this
.
BorderColor
=
{
Value
:
1
,
Color
:
'
transparent
'
};
// value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this
.
BorderSize
=
0
;
this
.
BorderType
=
Asc
.
c_oDashType
.
solid
;
this
.
textureNames
=
[
this
.
txtCanvas
,
this
.
txtCarton
,
this
.
txtDarkFabric
,
this
.
txtGrain
,
this
.
txtGranite
,
this
.
txtGreyPaper
,
this
.
txtKnit
,
this
.
txtLeather
,
this
.
txtBrownPaper
,
this
.
txtPapyrus
,
this
.
txtWood
];
...
...
@@ -534,6 +536,16 @@ define([
$
(
this
.
el
).
on
(
'
click
'
,
'
#shape-border-color-new
'
,
_
.
bind
(
this
.
addNewColor
,
this
,
this
.
colorsBorder
,
this
.
btnBorderColor
));
this
.
lockedControls
.
push
(
this
.
btnBorderColor
);
this
.
cmbBorderType
=
new
Common
.
UI
.
ComboBorderType
({
el
:
$
(
'
#shape-combo-border-type
'
),
style
:
"
width: 93px;
"
,
menuStyle
:
'
min-width: 93px;
'
}).
on
(
'
selected
'
,
_
.
bind
(
this
.
onBorderTypeSelect
,
this
))
.
on
(
'
combo:blur
'
,
_
.
bind
(
this
.
onComboBlur
,
this
,
false
));
this
.
BorderType
=
Asc
.
c_oDashType
.
solid
;
this
.
cmbBorderType
.
setValue
(
this
.
BorderType
);
this
.
lockedControls
.
push
(
this
.
cmbBorderType
);
this
.
btnChangeShape
=
new
Common
.
UI
.
Button
({
cls
:
'
btn-icon-default
'
,
iconCls
:
'
btn-change-shape
'
,
...
...
@@ -968,6 +980,7 @@ define([
stroke
.
put_color
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
({
color
:
'
000000
'
,
effectId
:
29
}));
else
if
(
this
.
_state
.
StrokeType
==
Asc
.
c_oAscStrokeType
.
STROKE_NONE
||
this
.
_state
.
StrokeType
===
null
)
stroke
.
put_color
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
(
Common
.
Utils
.
ThemeColor
.
colorValue2EffectId
(
this
.
BorderColor
.
Color
)));
stroke
.
asc_putPrstDash
(
this
.
BorderType
);
stroke
.
put_width
(
this
.
_pt2mm
(
this
.
BorderSize
));
}
props
.
put_stroke
(
stroke
);
...
...
@@ -1004,6 +1017,25 @@ define([
this
.
applyBorderSize
(
record
.
value
);
},
onBorderTypeSelect
:
function
(
combo
,
record
)
{
this
.
BorderType
=
record
.
value
;
if
(
this
.
api
&&
!
this
.
_noApply
)
{
var
props
=
new
Asc
.
asc_CShapeProperty
();
var
stroke
=
new
Asc
.
asc_CStroke
();
if
(
this
.
BorderSize
<
0.01
)
{
stroke
.
put_type
(
Asc
.
c_oAscStrokeType
.
STROKE_NONE
);
}
else
{
stroke
.
put_type
(
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
);
stroke
.
put_color
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
(
this
.
BorderColor
.
Color
));
stroke
.
put_width
(
this
.
_pt2mm
(
this
.
BorderSize
));
stroke
.
asc_putPrstDash
(
this
.
BorderType
);
}
props
.
put_stroke
(
stroke
);
this
.
api
.
ShapeApply
(
props
);
}
this
.
fireEvent
(
'
editcomplete
'
,
this
);
},
onColorsBorderSelect
:
function
(
picker
,
color
)
{
this
.
btnBorderColor
.
setColor
(
color
);
this
.
BorderColor
=
{
Value
:
1
,
Color
:
color
};
...
...
@@ -1016,6 +1048,7 @@ define([
stroke
.
put_type
(
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
);
stroke
.
put_color
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
(
this
.
BorderColor
.
Color
));
stroke
.
put_width
(
this
.
_pt2mm
(
this
.
BorderSize
));
stroke
.
asc_putPrstDash
(
this
.
BorderType
);
}
props
.
put_stroke
(
stroke
);
this
.
api
.
ShapeApply
(
props
);
...
...
@@ -1298,8 +1331,9 @@ define([
}
// border colors
var
stroke
=
props
.
get_stroke
();
var
strokeType
=
stroke
.
get_type
();
var
stroke
=
props
.
get_stroke
(),
strokeType
=
stroke
.
get_type
(),
borderType
;
if
(
stroke
)
{
if
(
strokeType
==
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
)
{
...
...
@@ -1316,6 +1350,7 @@ define([
}
else
{
this
.
BorderColor
=
{
Value
:
1
,
Color
:
'
transparent
'
};
}
borderType
=
stroke
.
asc_getPrstDash
();
}
else
{
// no stroke
strokeType
=
null
;
this
.
BorderColor
=
{
Value
:
0
,
Color
:
'
transparent
'
};
...
...
@@ -1378,6 +1413,11 @@ define([
this
.
_state
.
StrokeType
=
strokeType
;
}
if
(
this
.
_state
.
StrokeBorderType
!==
borderType
)
{
this
.
BorderType
=
this
.
_state
.
StrokeBorderType
=
borderType
;
this
.
cmbBorderType
.
setValue
(
borderType
);
}
// pattern colors
type1
=
typeof
(
this
.
FGColor
.
Color
);
type2
=
typeof
(
this
.
_state
.
FGColor
);
...
...
@@ -1680,6 +1720,7 @@ define([
textDirection
:
'
Direction
'
,
textStyle
:
'
Style
'
,
textGradient
:
'
Gradient
'
,
textBorderSizeErr
:
'
The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.
'
textBorderSizeErr
:
'
The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.
'
,
strType
:
'
Type
'
},
PE
.
Views
.
ShapeSettings
||
{}));
});
apps/presentationeditor/main/app/view/TextArtSettings.js
View file @
d7e63930
...
...
@@ -87,6 +87,7 @@ define([
StrokeType
:
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
,
StrokeWidth
:
this
.
_pt2mm
(
1
),
StrokeColor
:
'
000000
'
,
StrokeBorderType
:
Asc
.
c_oDashType
.
solid
,
FGColor
:
'
000000
'
,
BGColor
:
'
ffffff
'
,
GradColor
:
'
000000
'
,
...
...
@@ -110,6 +111,7 @@ define([
this
.
BorderColor
=
{
Value
:
1
,
Color
:
'
transparent
'
};
// value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this
.
BorderSize
=
0
;
this
.
BorderType
=
Asc
.
c_oDashType
.
solid
;
this
.
textureNames
=
[
this
.
txtCanvas
,
this
.
txtCarton
,
this
.
txtDarkFabric
,
this
.
txtGrain
,
this
.
txtGranite
,
this
.
txtGreyPaper
,
this
.
txtKnit
,
this
.
txtLeather
,
this
.
txtBrownPaper
,
this
.
txtPapyrus
,
this
.
txtWood
];
...
...
@@ -549,6 +551,16 @@ define([
this
.
btnBorderColor
.
setColor
(
'
000000
'
);
$
(
this
.
el
).
on
(
'
click
'
,
'
#textart-border-color-new
'
,
_
.
bind
(
this
.
addNewColor
,
this
,
this
.
colorsBorder
,
this
.
btnBorderColor
));
this
.
cmbBorderType
=
new
Common
.
UI
.
ComboBorderType
({
el
:
$
(
'
#textart-combo-border-type
'
),
style
:
"
width: 93px;
"
,
menuStyle
:
'
min-width: 93px;
'
}).
on
(
'
selected
'
,
_
.
bind
(
this
.
onBorderTypeSelect
,
this
))
.
on
(
'
combo:blur
'
,
_
.
bind
(
this
.
onComboBlur
,
this
,
false
));
this
.
BorderType
=
Asc
.
c_oDashType
.
solid
;
this
.
cmbBorderType
.
setValue
(
this
.
BorderType
);
this
.
lockedControls
.
push
(
this
.
cmbBorderType
);
this
.
cmbTransform
=
new
Common
.
UI
.
ComboDataView
({
itemWidth
:
50
,
itemHeight
:
50
,
...
...
@@ -997,6 +1009,7 @@ define([
stroke
.
put_color
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
({
color
:
'
000000
'
,
effectId
:
29
}));
else
if
(
this
.
_state
.
StrokeType
==
Asc
.
c_oAscStrokeType
.
STROKE_NONE
||
this
.
_state
.
StrokeType
===
null
)
stroke
.
put_color
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
(
Common
.
Utils
.
ThemeColor
.
colorValue2EffectId
(
this
.
BorderColor
.
Color
)));
stroke
.
asc_putPrstDash
(
this
.
BorderType
);
stroke
.
put_width
(
this
.
_pt2mm
(
this
.
BorderSize
));
}
props
.
asc_putLine
(
stroke
);
...
...
@@ -1034,6 +1047,26 @@ define([
this
.
applyBorderSize
(
record
.
value
);
},
onBorderTypeSelect
:
function
(
combo
,
record
)
{
this
.
BorderType
=
record
.
value
;
if
(
this
.
api
&&
!
this
.
_noApply
)
{
var
props
=
new
Asc
.
asc_TextArtProperties
();
var
stroke
=
new
Asc
.
asc_CStroke
();
if
(
this
.
BorderSize
<
0.01
)
{
stroke
.
put_type
(
Asc
.
c_oAscStrokeType
.
STROKE_NONE
);
}
else
{
stroke
.
put_type
(
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
);
stroke
.
put_color
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
(
this
.
BorderColor
.
Color
));
stroke
.
put_width
(
this
.
_pt2mm
(
this
.
BorderSize
));
stroke
.
asc_putPrstDash
(
this
.
BorderType
);
}
props
.
asc_putLine
(
stroke
);
this
.
shapeprops
.
put_TextArtProperties
(
props
);
this
.
api
.
ShapeApply
(
this
.
shapeprops
);
}
this
.
fireEvent
(
'
editcomplete
'
,
this
);
},
onColorsBorderSelect
:
function
(
picker
,
color
)
{
this
.
btnBorderColor
.
setColor
(
color
);
this
.
BorderColor
=
{
Value
:
1
,
Color
:
color
};
...
...
@@ -1046,6 +1079,7 @@ define([
stroke
.
put_type
(
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
);
stroke
.
put_color
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
(
this
.
BorderColor
.
Color
));
stroke
.
put_width
(
this
.
_pt2mm
(
this
.
BorderSize
));
stroke
.
asc_putPrstDash
(
this
.
BorderType
);
}
props
.
asc_putLine
(
stroke
);
this
.
shapeprops
.
put_TextArtProperties
(
props
);
...
...
@@ -1299,7 +1333,8 @@ define([
// border colors
var
stroke
=
shapeprops
.
asc_getLine
(),
strokeType
=
(
stroke
)
?
stroke
.
get_type
()
:
null
;
strokeType
=
(
stroke
)
?
stroke
.
get_type
()
:
null
,
borderType
;
if
(
stroke
)
{
if
(
strokeType
==
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
)
{
...
...
@@ -1316,6 +1351,7 @@ define([
}
else
{
this
.
BorderColor
=
{
Value
:
1
,
Color
:
'
transparent
'
};
}
borderType
=
stroke
.
asc_getPrstDash
();
}
else
{
// no stroke
this
.
BorderColor
=
{
Value
:
0
,
Color
:
'
transparent
'
};
}
...
...
@@ -1377,6 +1413,11 @@ define([
this
.
_state
.
StrokeType
=
strokeType
;
}
if
(
this
.
_state
.
StrokeBorderType
!==
borderType
)
{
this
.
BorderType
=
this
.
_state
.
StrokeBorderType
=
borderType
;
this
.
cmbBorderType
.
setValue
(
borderType
);
}
// pattern colors
type1
=
typeof
(
this
.
FGColor
.
Color
);
type2
=
typeof
(
this
.
_state
.
FGColor
);
...
...
@@ -1683,6 +1724,7 @@ define([
textGradient
:
'
Gradient
'
,
textBorderSizeErr
:
'
The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.
'
,
textTransform
:
'
Transform
'
,
textTemplate
:
'
Template
'
textTemplate
:
'
Template
'
,
strType
:
'
Type
'
},
PE
.
Views
.
TextArtSettings
||
{}));
});
apps/presentationeditor/main/locale/en.json
View file @
d7e63930
...
...
@@ -474,6 +474,7 @@
"PE.Views.ShapeSettings.strSize"
:
"Size"
,
"PE.Views.ShapeSettings.strStroke"
:
"Stroke"
,
"PE.Views.ShapeSettings.strTransparency"
:
"Opacity"
,
"PE.Views.ShapeSettings.strType"
:
"Type"
,
"PE.Views.ShapeSettings.textAdvanced"
:
"Show advanced settings"
,
"PE.Views.ShapeSettings.textBorderSizeErr"
:
"The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt."
,
"PE.Views.ShapeSettings.textColor"
:
"Color Fill"
,
...
...
@@ -712,6 +713,7 @@
"PE.Views.TextArtSettings.strSize"
:
"Size"
,
"PE.Views.TextArtSettings.strStroke"
:
"Stroke"
,
"PE.Views.TextArtSettings.strTransparency"
:
"Opacity"
,
"PE.Views.TextArtSettings.strType"
:
"Type"
,
"PE.Views.TextArtSettings.textBorderSizeErr"
:
"The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt."
,
"PE.Views.TextArtSettings.textColor"
:
"Color Fill"
,
"PE.Views.TextArtSettings.textDirection"
:
"Direction"
,
...
...
apps/spreadsheeteditor/main/app/template/ShapeSettings.template
View file @
d7e63930
...
...
@@ -108,6 +108,14 @@
</div>
</td>
</tr>
<tr>
<td class="padding-small">
<div style="display:inline-block;width:100px;vertical-align: middle;">
<label class="input-label" style=""><%= scope.strType %></label>
<div id="shape-combo-border-type" style="width: 93px;"></div>
</div>
</td>
</tr>
<tr class="shape-only">
<td class="padding-small"></td>
</tr>
...
...
apps/spreadsheeteditor/main/app/template/TextArtSettings.template
View file @
d7e63930
...
...
@@ -123,6 +123,14 @@
</div>
</td>
</tr>
<tr>
<td class="padding-small">
<div style="display:inline-block;width:100px;vertical-align: middle;">
<label class="input-label" style=""><%= scope.strType %></label>
<div id="textart-combo-border-type" style="width: 93px;"></div>
</div>
</td>
</tr>
<tr>
<td class="padding-small">
<div class="separator horizontal"></div>
...
...
apps/spreadsheeteditor/main/app/view/ShapeSettings.js
View file @
d7e63930
...
...
@@ -89,6 +89,7 @@ define([
StrokeType
:
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
,
StrokeWidth
:
this
.
_pt2mm
(
1
),
StrokeColor
:
'
000000
'
,
StrokeBorderType
:
Asc
.
c_oDashType
.
solid
,
FGColor
:
'
000000
'
,
BGColor
:
'
ffffff
'
,
GradColor
:
'
000000
'
,
...
...
@@ -114,6 +115,7 @@ define([
this
.
BorderColor
=
{
Value
:
1
,
Color
:
'
transparent
'
};
// value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this
.
BorderSize
=
0
;
this
.
BorderType
=
Asc
.
c_oDashType
.
solid
;
this
.
textureNames
=
[
this
.
txtCanvas
,
this
.
txtCarton
,
this
.
txtDarkFabric
,
this
.
txtGrain
,
this
.
txtGranite
,
this
.
txtGreyPaper
,
this
.
txtKnit
,
this
.
txtLeather
,
this
.
txtBrownPaper
,
this
.
txtPapyrus
,
this
.
txtWood
];
...
...
@@ -535,6 +537,16 @@ define([
$
(
this
.
el
).
on
(
'
click
'
,
'
#shape-border-color-new
'
,
_
.
bind
(
this
.
addNewColor
,
this
,
this
.
colorsBorder
,
this
.
btnBorderColor
));
this
.
lockedControls
.
push
(
this
.
btnBorderColor
);
this
.
cmbBorderType
=
new
Common
.
UI
.
ComboBorderType
({
el
:
$
(
'
#shape-combo-border-type
'
),
style
:
"
width: 93px;
"
,
menuStyle
:
'
min-width: 93px;
'
}).
on
(
'
selected
'
,
_
.
bind
(
this
.
onBorderTypeSelect
,
this
))
.
on
(
'
combo:blur
'
,
_
.
bind
(
this
.
onComboBlur
,
this
,
false
));
this
.
BorderType
=
Asc
.
c_oDashType
.
solid
;
this
.
cmbBorderType
.
setValue
(
this
.
BorderType
);
this
.
lockedControls
.
push
(
this
.
cmbBorderType
);
this
.
btnChangeShape
=
new
Common
.
UI
.
Button
({
cls
:
'
btn-icon-default
'
,
iconCls
:
'
btn-change-shape
'
,
...
...
@@ -984,6 +996,7 @@ define([
stroke
.
asc_putColor
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
({
color
:
'
000000
'
,
effectId
:
29
}));
else
if
(
this
.
_state
.
StrokeType
==
Asc
.
c_oAscStrokeType
.
STROKE_NONE
||
this
.
_state
.
StrokeType
===
null
)
stroke
.
asc_putColor
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
(
Common
.
Utils
.
ThemeColor
.
colorValue2EffectId
(
this
.
BorderColor
.
Color
)));
stroke
.
asc_putPrstDash
(
this
.
BorderType
);
stroke
.
asc_putWidth
(
this
.
_pt2mm
(
this
.
BorderSize
));
}
props
.
asc_putStroke
(
stroke
);
...
...
@@ -1021,6 +1034,26 @@ define([
this
.
applyBorderSize
(
record
.
value
);
},
onBorderTypeSelect
:
function
(
combo
,
record
)
{
this
.
BorderType
=
record
.
value
;
if
(
this
.
api
&&
!
this
.
_noApply
)
{
var
props
=
new
Asc
.
asc_CShapeProperty
();
var
stroke
=
new
Asc
.
asc_CStroke
();
if
(
this
.
BorderSize
<
0.01
)
{
stroke
.
put_type
(
Asc
.
c_oAscStrokeType
.
STROKE_NONE
);
}
else
{
stroke
.
put_type
(
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
);
stroke
.
put_color
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
(
this
.
BorderColor
.
Color
));
stroke
.
put_width
(
this
.
_pt2mm
(
this
.
BorderSize
));
stroke
.
asc_putPrstDash
(
this
.
BorderType
);
}
props
.
put_stroke
(
stroke
);
this
.
imgprops
.
asc_putShapeProperties
(
props
);
this
.
api
.
asc_setGraphicObjectProps
(
this
.
imgprops
);
}
this
.
fireEvent
(
'
editcomplete
'
,
this
);
},
onColorsBorderSelect
:
function
(
picker
,
color
)
{
this
.
btnBorderColor
.
setColor
(
color
);
this
.
BorderColor
=
{
Value
:
1
,
Color
:
color
};
...
...
@@ -1033,6 +1066,7 @@ define([
stroke
.
asc_putType
(
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
);
stroke
.
asc_putColor
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
(
this
.
BorderColor
.
Color
));
stroke
.
asc_putWidth
(
this
.
_pt2mm
(
this
.
BorderSize
));
stroke
.
asc_putPrstDash
(
this
.
BorderType
);
}
props
.
asc_putStroke
(
stroke
);
this
.
imgprops
.
asc_putShapeProperties
(
props
);
...
...
@@ -1321,8 +1355,9 @@ define([
}
// border colors
var
stroke
=
shapeprops
.
asc_getStroke
();
var
strokeType
=
stroke
.
asc_getType
();
var
stroke
=
shapeprops
.
asc_getStroke
(),
strokeType
=
stroke
.
asc_getType
(),
borderType
;
if
(
stroke
)
{
if
(
strokeType
==
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
)
{
...
...
@@ -1339,6 +1374,7 @@ define([
}
else
{
this
.
BorderColor
=
{
Value
:
1
,
Color
:
'
transparent
'
};
}
borderType
=
stroke
.
asc_getPrstDash
();
}
else
{
// no stroke
strokeType
=
null
;
this
.
BorderColor
=
{
Value
:
0
,
Color
:
'
transparent
'
};
...
...
@@ -1401,6 +1437,11 @@ define([
this
.
_state
.
StrokeType
=
strokeType
;
}
if
(
this
.
_state
.
StrokeBorderType
!==
borderType
)
{
this
.
BorderType
=
this
.
_state
.
StrokeBorderType
=
borderType
;
this
.
cmbBorderType
.
setValue
(
borderType
);
}
// pattern colors
type1
=
typeof
(
this
.
FGColor
.
Color
);
type2
=
typeof
(
this
.
_state
.
FGColor
);
...
...
@@ -1704,6 +1745,7 @@ define([
textDirection
:
'
Direction
'
,
textStyle
:
'
Style
'
,
textGradient
:
'
Gradient
'
,
textBorderSizeErr
:
'
The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.
'
textBorderSizeErr
:
'
The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.
'
,
strType
:
'
Type
'
},
SSE
.
Views
.
ShapeSettings
||
{}));
});
apps/spreadsheeteditor/main/app/view/TextArtSettings.js
View file @
d7e63930
...
...
@@ -88,6 +88,7 @@ define([
StrokeType
:
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
,
StrokeWidth
:
this
.
_pt2mm
(
1
),
StrokeColor
:
'
000000
'
,
StrokeBorderType
:
Asc
.
c_oDashType
.
solid
,
FGColor
:
'
000000
'
,
BGColor
:
'
ffffff
'
,
GradColor
:
'
000000
'
,
...
...
@@ -111,6 +112,7 @@ define([
this
.
BorderColor
=
{
Value
:
1
,
Color
:
'
transparent
'
};
// value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this
.
BorderSize
=
0
;
this
.
BorderType
=
Asc
.
c_oDashType
.
solid
;
this
.
textureNames
=
[
this
.
txtCanvas
,
this
.
txtCarton
,
this
.
txtDarkFabric
,
this
.
txtGrain
,
this
.
txtGranite
,
this
.
txtGreyPaper
,
this
.
txtKnit
,
this
.
txtLeather
,
this
.
txtBrownPaper
,
this
.
txtPapyrus
,
this
.
txtWood
];
...
...
@@ -550,6 +552,16 @@ define([
this
.
btnBorderColor
.
setColor
(
'
000000
'
);
$
(
this
.
el
).
on
(
'
click
'
,
'
#textart-border-color-new
'
,
_
.
bind
(
this
.
addNewColor
,
this
,
this
.
colorsBorder
,
this
.
btnBorderColor
));
this
.
cmbBorderType
=
new
Common
.
UI
.
ComboBorderType
({
el
:
$
(
'
#textart-combo-border-type
'
),
style
:
"
width: 93px;
"
,
menuStyle
:
'
min-width: 93px;
'
}).
on
(
'
selected
'
,
_
.
bind
(
this
.
onBorderTypeSelect
,
this
))
.
on
(
'
combo:blur
'
,
_
.
bind
(
this
.
onComboBlur
,
this
,
false
));
this
.
BorderType
=
Asc
.
c_oDashType
.
solid
;
this
.
cmbBorderType
.
setValue
(
this
.
BorderType
);
this
.
lockedControls
.
push
(
this
.
cmbBorderType
);
this
.
cmbTransform
=
new
Common
.
UI
.
ComboDataView
({
itemWidth
:
50
,
itemHeight
:
50
,
...
...
@@ -998,6 +1010,7 @@ define([
stroke
.
asc_putColor
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
({
color
:
'
000000
'
,
effectId
:
29
}));
else
if
(
this
.
_state
.
StrokeType
==
Asc
.
c_oAscStrokeType
.
STROKE_NONE
||
this
.
_state
.
StrokeType
===
null
)
stroke
.
asc_putColor
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
(
Common
.
Utils
.
ThemeColor
.
colorValue2EffectId
(
this
.
BorderColor
.
Color
)));
stroke
.
asc_putPrstDash
(
this
.
BorderType
);
stroke
.
asc_putWidth
(
this
.
_pt2mm
(
this
.
BorderSize
));
}
props
.
asc_putLine
(
stroke
);
...
...
@@ -1035,6 +1048,26 @@ define([
this
.
applyBorderSize
(
record
.
value
);
},
onBorderTypeSelect
:
function
(
combo
,
record
)
{
this
.
BorderType
=
record
.
value
;
if
(
this
.
api
&&
!
this
.
_noApply
)
{
var
props
=
new
Asc
.
asc_TextArtProperties
();
var
stroke
=
new
Asc
.
asc_CStroke
();
if
(
this
.
BorderSize
<
0.01
)
{
stroke
.
put_type
(
Asc
.
c_oAscStrokeType
.
STROKE_NONE
);
}
else
{
stroke
.
put_type
(
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
);
stroke
.
put_color
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
(
this
.
BorderColor
.
Color
));
stroke
.
put_width
(
this
.
_pt2mm
(
this
.
BorderSize
));
stroke
.
asc_putPrstDash
(
this
.
BorderType
);
}
props
.
asc_putLine
(
stroke
);
this
.
shapeprops
.
put_TextArtProperties
(
props
);
this
.
api
.
asc_setGraphicObjectProps
(
this
.
imgprops
);
}
this
.
fireEvent
(
'
editcomplete
'
,
this
);
},
onColorsBorderSelect
:
function
(
picker
,
color
)
{
this
.
btnBorderColor
.
setColor
(
color
);
this
.
BorderColor
=
{
Value
:
1
,
Color
:
color
};
...
...
@@ -1047,6 +1080,7 @@ define([
stroke
.
asc_putType
(
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
);
stroke
.
asc_putColor
(
Common
.
Utils
.
ThemeColor
.
getRgbColor
(
this
.
BorderColor
.
Color
));
stroke
.
asc_putWidth
(
this
.
_pt2mm
(
this
.
BorderSize
));
stroke
.
asc_putPrstDash
(
this
.
BorderType
);
}
props
.
asc_putLine
(
stroke
);
this
.
shapeprops
.
put_TextArtProperties
(
props
);
...
...
@@ -1303,7 +1337,8 @@ define([
// border colors
var
stroke
=
shapeprops
.
asc_getLine
(),
strokeType
=
(
stroke
)
?
stroke
.
asc_getType
()
:
null
;
strokeType
=
(
stroke
)
?
stroke
.
asc_getType
()
:
null
,
borderType
;
if
(
stroke
)
{
if
(
strokeType
==
Asc
.
c_oAscStrokeType
.
STROKE_COLOR
)
{
...
...
@@ -1320,6 +1355,7 @@ define([
}
else
{
this
.
BorderColor
=
{
Value
:
1
,
Color
:
'
transparent
'
};
}
borderType
=
stroke
.
asc_getPrstDash
();
}
else
{
// no stroke
this
.
BorderColor
=
{
Value
:
0
,
Color
:
'
transparent
'
};
}
...
...
@@ -1381,6 +1417,11 @@ define([
this
.
_state
.
StrokeType
=
strokeType
;
}
if
(
this
.
_state
.
StrokeBorderType
!==
borderType
)
{
this
.
BorderType
=
this
.
_state
.
StrokeBorderType
=
borderType
;
this
.
cmbBorderType
.
setValue
(
borderType
);
}
// pattern colors
type1
=
typeof
(
this
.
FGColor
.
Color
);
type2
=
typeof
(
this
.
_state
.
FGColor
);
...
...
@@ -1688,6 +1729,7 @@ define([
textGradient
:
'
Gradient
'
,
textBorderSizeErr
:
'
The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.
'
,
textTransform
:
'
Transform
'
,
textTemplate
:
'
Template
'
textTemplate
:
'
Template
'
,
strType
:
'
Type
'
},
SSE
.
Views
.
TextArtSettings
||
{}));
});
apps/spreadsheeteditor/main/locale/en.json
View file @
d7e63930
...
...
@@ -773,6 +773,7 @@
"SSE.Views.ShapeSettings.strSize"
:
"Size"
,
"SSE.Views.ShapeSettings.strStroke"
:
"Stroke"
,
"SSE.Views.ShapeSettings.strTransparency"
:
"Opacity"
,
"SSE.Views.ShapeSettings.strType"
:
"Type"
,
"SSE.Views.ShapeSettings.textAdvanced"
:
"Show advanced settings"
,
"SSE.Views.ShapeSettings.textBorderSizeErr"
:
"The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt."
,
"SSE.Views.ShapeSettings.textColor"
:
"Color Fill"
,
...
...
@@ -917,6 +918,7 @@
"SSE.Views.TextArtSettings.strSize"
:
"Size"
,
"SSE.Views.TextArtSettings.strStroke"
:
"Stroke"
,
"SSE.Views.TextArtSettings.strTransparency"
:
"Opacity"
,
"SSE.Views.TextArtSettings.strType"
:
"Type"
,
"SSE.Views.TextArtSettings.textBorderSizeErr"
:
"The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt."
,
"SSE.Views.TextArtSettings.textColor"
:
"Color Fill"
,
"SSE.Views.TextArtSettings.textDirection"
:
"Direction"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment