Commit a91248d9 by ramdayalmunda

setting up new data

parent 644d57ce
......@@ -14,7 +14,6 @@ var defaultConfig = {
format: {
background: "#fff",
margin: 20, // mm //
canvasMargin: 20, // px //
border: "", // could be image or anything
},
style: {
......@@ -26,6 +25,16 @@ var defaultConfig = {
},
}
var caretData = {
activeData: dataSet[0], // this holds the active data from the dataSet
index: 0,// this holds the caret index of the character in that activeData
interval: null, // to store the setInterval for the blinking cursor animation
intervalDuration: 800, // ms // to detemine for how long the caret is blinked before reappearing again
blink: false, // this will keep alternating to to show the caret or not
canvasIndex: 0, // to store index of the canvas which isBeing edited right now.
caretSize: config.style.fontSize,
}
var dataType = [
"plainText", // plain text, normal text in a pdf or doc text
"list", // items displayed in a list format
......@@ -40,28 +49,16 @@ var dataSet = [
},
{
type: 1, // type 1, denotes it is a list,
listType: "",
tabNumber: 0, // tab number by default is zero
plainText: "This is the first item in the list. it can be wrapped around the line if necessary"
},
{
// this is the second item on the list because the prvious item is also a list and has the same tabNumber
type: 1, // type 1, denotes it is a list,
itemType: "",
tabNumber: 0, // tab number by default is zero
items: [
{
plainText: "This is the first item in the list. it can be wrapped around the line if necessary"
},
{
plainText: "Second item is here."
},
{
plainText: "The list can be nested like this",
items: [
{
plainText: "First nested item is here"
},
{
plainText: "This is the second nested item"
}
]
}
]
plainText: "The second item on the list is here."
},
{
type: 0, // this is just a blank line that is added
......
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