Open XiangYyang opened 10 months ago
Thanks for doing this! I'll take a look when I have a chance - probably this weekend or early next week. :)
Could you please review this pr? Thanks.
I will once I have enough time to review it thoroughly.
On Thu, Jan 11, 2024 at 9:09 PM 向阳 @.***> wrote:
Could you please review this pr? Thanks.
— Reply to this email directly, view it on GitHub https://github.com/theacodes/kicanvas/pull/56#issuecomment-1888303322, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB5I42E7UANHFA2J74EOO3YOCLOXAVCNFSM6AAAAAA7F27GISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBYGMYDGMZSGI . You are receiving this because you commented.Message ID: @.***>
I tried to add the inline source support by changing the
FetchFileSystem
.I added a
FetchFileSource
class to help determine data sources, from URL or inline sources.When the source is an inline source, the
load_src
method ofKiCanvasEmbedElement
will use two attributes. The filename will be obtained from the attributeoriginname
and thetype
attribute describes the file type. When theoriginname
attribute is empty, that will generate a default name for this file. Likewise, it will determine whether the inline source is sch or pcb by the first few characters when thetype
attribute is empty.Finally, the file type and the origin name will be contacted, and it as the inline source file name.