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
a83bdb6a
Commit
a83bdb6a
authored
Jan 13, 2024
by
ramdayalmunda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
care position fix 2
parent
babead2c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
a-doc-editor2.js
dist/assets/a-doc-editor2.js
+5
-1
No files found.
dist/assets/a-doc-editor2.js
View file @
a83bdb6a
...
...
@@ -258,6 +258,7 @@ var ADocEditor = function (customConfig) {
renderCaret
(
true
)
function
calculateTextSizeAndPosition
()
{
console
.
clear
()
let
d
=
0
,
c
=
0
;
function
getLineObj
()
{
let
newLineObj
=
{
...
...
@@ -341,6 +342,7 @@ var ADocEditor = function (customConfig) {
lineObj
=
new
getLineObj
()
maxLineWidth
=
config
.
pageSetup
.
pxWidth
-
(
config
.
format
.
margin
*
pxMmRatio
*
2
)
lineObj
.
maxLineWidth
=
maxLineWidth
lineObj
.
maxFontSize
=
style
.
fontSize
if
(
dataBlock
.
type
==
1
)
lineObj
.
tabWidth
=
tabWidth
else
lineObj
.
tabWidth
=
0
if
(
dataBlock
.
type
==
1
)
lineObj
.
tabCount
=
dataBlock
.
tabCount
...
...
@@ -778,7 +780,9 @@ var ADocEditor = function (customConfig) {
let charData = caretData.activeData.formatedText[caretData.index - 1]
if (lineObj) {
x = (charData?(charData.x+charData.width):x)
y = lineObj.y-(lineObj.maxFontSize*pxMmRatio)
if(charData)y = charData.y-(lineObj.maxFontSize*pxMmRatio)
else y = lineObj.y-(lineObj.maxFontSize*pxMmRatio)
}
...
...
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