Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
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
sdkjs
Commits
a96ef04b
Commit
a96ef04b
authored
Jul 14, 2017
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete renderForPrint -> render with argument drawing context
parent
aece5789
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
19 deletions
+6
-19
cell/view/CellEditorView.js
cell/view/CellEditorView.js
+1
-1
cell/view/StringRender.js
cell/view/StringRender.js
+1
-14
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+4
-4
No files found.
cell/view/CellEditorView.js
View file @
a96ef04b
...
...
@@ -1326,7 +1326,7 @@
}
if
(
opt
.
fragments
.
length
>
0
)
{
t
.
textRender
.
render
(
t
.
_getContentLeft
(),
dy
||
0
,
t
.
_getContentWidth
(),
opt
.
textColor
);
t
.
textRender
.
render
(
undefined
,
t
.
_getContentLeft
(),
dy
||
0
,
t
.
_getContentWidth
(),
opt
.
textColor
);
}
};
...
...
cell/view/StringRender.js
View file @
a96ef04b
...
...
@@ -432,19 +432,6 @@
return
this
.
_doMeasure
(
maxWidth
);
};
/**
* Draw string that was setup by methods 'setString' or 'measureString'
* @param {Number} x Left of the text rect
* @param {Number} y Top of the text rect
* @param {Number} maxWidth Text width restriction
* @param {String} textColor Default text color for formatless string
* @return {StringRender} Returns 'this' to allow chaining
*/
StringRender
.
prototype
.
render
=
function
(
x
,
y
,
maxWidth
,
textColor
)
{
this
.
_doRender
(
undefined
,
x
,
y
,
maxWidth
,
textColor
);
return
this
;
};
/**
* Draw string that was setup by methods 'setString' or 'measureString'
* @param {drawingCtx} drawingCtx
...
...
@@ -454,7 +441,7 @@
* @param {String} textColor Default text color for formatless string
* @return {StringRender} Returns 'this' to allow chaining
*/
StringRender
.
prototype
.
render
ForPrint
=
function
(
drawingCtx
,
x
,
y
,
maxWidth
,
textColor
)
{
StringRender
.
prototype
.
render
=
function
(
drawingCtx
,
x
,
y
,
maxWidth
,
textColor
)
{
this
.
_doRender
(
drawingCtx
,
x
,
y
,
maxWidth
,
textColor
);
return
this
;
};
...
...
cell/view/WorksheetView.js
View file @
a96ef04b
...
...
@@ -2707,7 +2707,7 @@
}
this
.
stringRender
.
rotateAtPoint
(
drawingCtx
,
ct
.
angle
,
xb1
,
yb1
,
ct
.
textBound
.
dx
,
ct
.
textBound
.
dy
);
this
.
stringRender
.
restoreInternalState
(
ct
.
state
).
render
ForPrint
(
drawingCtx
,
0
,
0
,
textW
,
ct
.
color
);
this
.
stringRender
.
restoreInternalState
(
ct
.
state
).
render
(
drawingCtx
,
0
,
0
,
textW
,
ct
.
color
);
textAlign
=
this
.
stringRender
.
flags
.
textAlign
;
if
(
isWrapped
)
{
...
...
@@ -2737,7 +2737,7 @@
}
else
{
ctx
.
AddClipRect
(
x1
,
y1
,
w
,
h
);
this
.
stringRender
.
restoreInternalState
(
ct
.
state
).
render
ForPrint
(
drawingCtx
,
textX
,
textY
,
textW
,
ct
.
color
);
this
.
stringRender
.
restoreInternalState
(
ct
.
state
).
render
(
drawingCtx
,
textX
,
textY
,
textW
,
ct
.
color
);
ctx
.
RemoveClipRect
();
}
}
...
...
@@ -2849,7 +2849,7 @@
}
}
this
.
stringRender
.
render
(
0
,
0
,
textW
,
ct
.
color
);
this
.
stringRender
.
render
(
drawingCtx
,
0
,
0
,
textW
,
ct
.
color
);
// var color = new CColor(0, 0, 255, 0.5);
//
...
...
@@ -2875,7 +2875,7 @@
}
else
{
ctx
.
save
().
beginPath
().
rect
(
x1
,
y1
,
w
,
h
).
clip
();
this
.
stringRender
.
restoreInternalState
(
ct
.
state
).
render
(
textX
,
textY
,
textW
,
ct
.
color
);
this
.
stringRender
.
restoreInternalState
(
ct
.
state
).
render
(
drawingCtx
,
textX
,
textY
,
textW
,
ct
.
color
);
ctx
.
restore
();
}
}
...
...
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