Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
a-doc-editor
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ramdayal Munda
a-doc-editor
Commits
c1a38610
Commit
c1a38610
authored
Nov 30, 2023
by
ramdayalmunda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caret and wrapping completed
parent
f8c25208
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
a-doc-editor.js
dist/assets/a-doc-editor.js
+4
-3
No files found.
dist/assets/a-doc-editor.js
View file @
c1a38610
...
@@ -168,12 +168,13 @@ var ADocEditor = function (customConfig) {
...
@@ -168,12 +168,13 @@ var ADocEditor = function (customConfig) {
return
true
return
true
}
}
if
(
!
caretData
.
blink
&&
focusedCanvas
)
renderCaret
()
if
(
!
caretData
.
blink
&&
focusedCanvas
&&
caretData
.
activeData
)
renderCaret
()
// to render caret
// to render caret
function
renderCaret
()
{
function
renderCaret
()
{
let
ctx
=
canvasList
[
caretData
.
canvasIndex
].
getContext
(
'2d'
,
{
willReadFrequently
:
true
})
let
ctx
=
canvasList
[
caretData
.
canvasIndex
].
getContext
(
'2d'
,
{
willReadFrequently
:
true
})
let
rectX
=
caretData
.
x
;
let
activeTextData
=
caretData
.
activeData
.
formatedText
[
caretData
.
index
-
1
]
let
rectY
=
caretData
.
y
-
caretData
.
caretSize
;
let
rectX
=
activeTextData
.
x
+
activeTextData
.
width
;
let
rectY
=
activeTextData
.
y
-
activeTextData
.
fontSize
;
let
rectWidth
=
2
;
let
rectWidth
=
2
;
let
rectHeight
=
caretData
.
caretSize
;
let
rectHeight
=
caretData
.
caretSize
;
...
...
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