mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-01-23 03:18:03 +01:00
- [SVG In] Fix node not read svg file with extra tags.
This commit is contained in:
parent
b5f227b5c5
commit
5ab7efb778
5 changed files with 13 additions and 10 deletions
|
@ -228,11 +228,10 @@
|
|||
break;
|
||||
}
|
||||
|
||||
if(!IS_CMD)PANEL_GRAPH.mouse_grid_y += 160;
|
||||
if(!IS_CMD) PANEL_GRAPH.mouse_grid_y += 160;
|
||||
}
|
||||
|
||||
if(node && !IS_CMD)
|
||||
PANEL_GRAPH.toCenterNode();
|
||||
// if(node && !IS_CMD) PANEL_GRAPH.toCenterNode();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
LATEST_VERSION = 11700;
|
||||
VERSION = 11742;
|
||||
SAVE_VERSION = 11700;
|
||||
VERSION_STRING = "1.17.4.2";
|
||||
VERSION_STRING = "1.17.5.001";
|
||||
BUILD_NUMBER = 11742;
|
||||
|
||||
globalvar HOTKEYS, HOTKEY_CONTEXT;
|
||||
|
|
|
@ -86,12 +86,12 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
|
|||
inputs[| 9].setVisible(pack == SPRITE_STACK.grid);
|
||||
|
||||
if(grup == SPRITE_ANIM_GROUP.animation) {
|
||||
inputs[| 8].editWidget.minn = FIRST_FRAME + 1;
|
||||
inputs[| 8].editWidget.maxx = LAST_FRAME + 1;
|
||||
inputs[| 8].editWidget.slide_range[0] = FIRST_FRAME + 1;
|
||||
inputs[| 8].editWidget.slide_range[1] = LAST_FRAME + 1;
|
||||
if(!user) inputs[| 8].setValueDirect([ FIRST_FRAME + 1, LAST_FRAME + 1], noone, false, 0, false);
|
||||
} else {
|
||||
inputs[| 8].editWidget.minn = 0;
|
||||
inputs[| 8].editWidget.maxx = array_length(inpt) - 1;
|
||||
inputs[| 8].editWidget.slide_range[0] = 0;
|
||||
inputs[| 8].editWidget.slide_range[1] = array_length(inpt) - 1;
|
||||
if(!user) inputs[| 8].setValueDirect([ 0, array_length(inpt) - 1], noone, false, 0, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -58,6 +58,10 @@ function Node_SVG(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
|||
if(ext != ".svg") return;
|
||||
|
||||
var _rawContent = file_text_read_all_lines(path);
|
||||
var _st = string_pos("<svg", _rawContent);
|
||||
var _end = string_length(_rawContent);
|
||||
_rawContent = string_copy(_rawContent, _st, _end - _st + 1);
|
||||
|
||||
rawContent = SnapFromXML(_rawContent);
|
||||
content = svg_parse(rawContent);
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ function svg_parse(xmlStr) {
|
|||
var hh = struct_try_get(attr, "height", 1);
|
||||
|
||||
var svg = new SVG().setAttr(attr);
|
||||
svg.width = toNumber(string_digits(ww));
|
||||
svg.height = toNumber(string_digits(hh));
|
||||
svg.width = toNumber(ww);
|
||||
svg.height = toNumber(hh);
|
||||
|
||||
if(struct_has(attr, "viewBox")) {
|
||||
var bbox = attr.viewBox;
|
||||
|
|
Loading…
Reference in a new issue