Skip to content

add console logs to get svgs #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add console logs
  • Loading branch information
toto4tots committed Apr 18, 2023
commit cd40b9a3f86fa210399cd35e8c63f61791b4b78f
2 changes: 2 additions & 0 deletions src/painteditor/Paint.js
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,7 @@ export default class Paint {
static createBkgFromXML (str) {
nativeJr = str.indexOf('Scratch Jr') > -1;
str = str.replace(/>\s*</g, '><');
console.log(str);
var xmlDoc = new DOMParser().parseFromString(str, 'text/xml');
var extxml = document.importNode(xmlDoc.documentElement, true);
var flat = Paint.skipUnwantedElements(extxml, []);
Expand Down Expand Up @@ -1499,6 +1500,7 @@ export default class Paint {
}
Paint.setUpCanvasArea();
str = str.replace(/>\s*</g, '><');
console.log(str);
var xmlDoc = new DOMParser().parseFromString(str, 'text/xml');
var extxml = document.importNode(xmlDoc.documentElement, true);
var flat = Paint.skipUnwantedElements(extxml, []);
Expand Down
1 change: 1 addition & 0 deletions src/tablet/IO.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default class IO {

static getThumbnail (str, w, h, destw, desth) {
str = str.replace(/>\s*</g, '><');
console.log(str);
var xmlDoc = new DOMParser().parseFromString(str, 'text/xml');
var extxml = document.importNode(xmlDoc.documentElement, true);
if (extxml.childNodes[0].nodeName == '#comment') {
Expand Down