Commit 917b55d5 by ramdayalmunda

right key on end fixed

parent dc4c8712
...@@ -256,7 +256,7 @@ var ADocEditor = function (customConfig) { ...@@ -256,7 +256,7 @@ var ADocEditor = function (customConfig) {
rectX = rectX ? rectX : 0 rectX = rectX ? rectX : 0
rectY = rectY ? rectY : 0 rectY = rectY ? rectY : 0
let rectWidth = 2; let rectWidth = 2;
let rectHeight = caretData.caretSize; let rectHeight = caretData.caretSize + activeTextData?.fontSize/3;
const imageData = ctx.getImageData(rectX, rectY, rectWidth, rectHeight); const imageData = ctx.getImageData(rectX, rectY, rectWidth, rectHeight);
const data = imageData.data; const data = imageData.data;
...@@ -367,7 +367,6 @@ var ADocEditor = function (customConfig) { ...@@ -367,7 +367,6 @@ var ADocEditor = function (customConfig) {
if (caretData.index <= caretData.activeData.plainContent.length-1){ if (caretData.index <= caretData.activeData.plainContent.length-1){
caretData.index = (caretData.index >= caretData.activeData.plainContent.length) ? caretData.activeData.plainContent.length : caretData.index + 1 caretData.index = (caretData.index >= caretData.activeData.plainContent.length) ? caretData.activeData.plainContent.length : caretData.index + 1
}else{ }else{
caretData.index = 0;
let currentIndex = dataSet.findIndex( item => item.id == caretData.activeData.id ) let currentIndex = dataSet.findIndex( item => item.id == caretData.activeData.id )
let nextData = dataSet[currentIndex+1] let nextData = dataSet[currentIndex+1]
if (nextData){ if (nextData){
......
...@@ -24,7 +24,6 @@ function setData() { ...@@ -24,7 +24,6 @@ function setData() {
"type": "text", "type": "text",
"plainContent": "Did you ever hear about the Great Ice Age or the Pleistocene Epoch? Less than one million years ago, in fact, some 12,000 years ago, an ice sheet many thousands of feet thick rode over Burke Mountain in a southeastward direction.", "plainContent": "Did you ever hear about the Great Ice Age or the Pleistocene Epoch? Less than one million years ago, in fact, some 12,000 years ago, an ice sheet many thousands of feet thick rode over Burke Mountain in a southeastward direction.",
"style": { "style": {
"char": "!",
"width": 0, "width": 0,
"x": 0, "x": 0,
"y": 56, "y": 56,
......
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