PptxGenJS
PptxGenJS copied to clipboard
added connected lines for shapes
hi, i am aware of the other pull request by @lifejuggler. But seeing as how that is over a year old i thought i would just contribute again. i have updated some of @lifejugglers code to be able to merge into the newest master branch, and added a bit of a patch solution to id's
if (slideItemObj.options != undefined) {
if (slideItemObj.options.sId != undefined) {
if (IDs.indexOf(slideItemObj.options.sId) > -1) {
throw "ID is already in use, object / shape id cannot be the same for multiple objects / shapes";
} else {
IDs.push(slideItemObj.options.sId);
}
} else {
if (IDs.indexOf(idx + 2) > -1) {
throw "an sID used matched an automatically generated ID try using a higher number";
} else {
IDs.push(idx + 2);
}
}
}
this at least throws an error if you have colliding id's, however i was wondering you you though it would be smarter to just automatically increment over already taken ids or if functions should return an automatically generated id to the user for them to use.
i also added an anchor enum that works at least for rectangular shapes. and added connectors to the shapes demo, like you asked.
i can also add connectors to other objects like tables or media, but i don't know if that is even somthing that we want?
should the user need to calculate their own position of of the connector arrows, or do we want this functionality built into the library? i can add this feature for squares at least.
i am very willing to help out with development of this feature if you just tell my what you think is best.
This is a great and very important feature to have! Will it be available soon?
Thanks @fred441a - can you provide sample usage code?
i have added the connected lines for shapes functionallity to the shapes demo
Would love to see this feature added soon. Anything I can do to help with this process?
Why isn't that implemented?