Commit c1a38610 by ramdayalmunda

caret and wrapping completed

parent f8c25208
......@@ -168,12 +168,13 @@ var ADocEditor = function (customConfig) {
return true
}
if (!caretData.blink && focusedCanvas) renderCaret()
if (!caretData.blink && focusedCanvas && caretData.activeData) renderCaret()
// to render caret
function renderCaret() {
let ctx = canvasList[caretData.canvasIndex].getContext('2d', { willReadFrequently: true })
let rectX = caretData.x;
let rectY = caretData.y - caretData.caretSize;
let activeTextData = caretData.activeData.formatedText[caretData.index-1]
let rectX = activeTextData.x+activeTextData.width;
let rectY = activeTextData.y-activeTextData.fontSize;
let rectWidth = 2;
let rectHeight = caretData.caretSize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment