Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
purr-data
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
268
Issues
268
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jonathan Wilkes
purr-data
Commits
77536614
Commit
77536614
authored
Oct 22, 2017
by
Jonathan Wilkes
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'drawimage-fix'
parents
f87b33a0
4b02063b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
pd/nw/pdgui.js
pd/nw/pdgui.js
+9
-4
No files found.
pd/nw/pdgui.js
View file @
77536614
...
...
@@ -3533,13 +3533,18 @@ function gui_drawimage_new(obj_tag, file_path, canvasdir, flags) {
}
file_path
=
path
.
normalize
(
file_path
);
}
if
(
file_path
!==
""
&&
fs
.
existsSync
(
file_path
)
&&
fs
.
lstatSync
(
file_path
).
isDirectory
())
{
files
=
fs
.
readdirSync
(
file_path
)
if
(
file_path
!==
""
&&
fs
.
existsSync
(
file_path
))
{
if
(
image_seq
&&
fs
.
lstatSync
(
file_path
).
isDirectory
())
{
// [draw sprite]
files
=
fs
.
readdirSync
(
file_path
)
.
sort
();
// Note that js's "sort" method doesn't do the
// "right thing" for numbers. For that we'd need
// to provide our own sorting function
}
else
{
// [draw image]
files
=
[
path
.
basename
(
file_path
)];
file_path
=
path
.
dirname
(
file_path
);
}
// todo: warn about image sequence with > 999
files
.
forEach
(
function
(
file
)
{
ext
=
path
.
extname
(
file
).
toLowerCase
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment