Skip to content

Commit

Permalink
fix issue with circulara drop area rendering / fix issue with revert …
Browse files Browse the repository at this point in the history
…handler not being called when using api
  • Loading branch information
rikschennink committed Apr 30, 2020
1 parent 7f09f39 commit 044a7ca
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 4.13.5

- Fix trigger of revert handler to `removeFile` API.
- Fix problem where circular layout wouldn't work on latest Safari.


## 4.13.4

- Fix issue where FilePond internal event mechanism would be in slowmotion mode when running in an inactive tab because of `setTimeout` use.
Expand Down
10 changes: 9 additions & 1 deletion dist/filepond.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* FilePond 4.13.4
* FilePond 4.13.5
* Licensed under MIT, https://opensource.org/licenses/MIT/
* Please visit https://pqina.nl/filepond/ for details.
*/
Expand Down Expand Up @@ -706,6 +706,14 @@
display: none;
}

@media not all and (min-resolution: 0.001dpcm) {
@supports (-webkit-appearance: none) and (stroke-color: transparent) {
.filepond--root[data-style-panel-layout~='circle'] {
will-change: transform;
}
}
}

.filepond--panel-root {
border-radius: 0.5em;
background-color: #f1f0ef;
Expand Down
14 changes: 13 additions & 1 deletion dist/filepond.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* FilePond 4.13.4
* FilePond 4.13.5
* Licensed under MIT, https://opensource.org/licenses/MIT/
* Please visit https://pqina.nl/filepond/ for details.
*/
Expand Down Expand Up @@ -4960,6 +4960,18 @@ const actions = (dispatch, query, state) => ({
}
);
} else {
// if is limbo item, need to call revert handler (not calling request_ because that would also trigger beforeRemoveHook)
if (item.origin === FileOrigin.LIMBO && item.serverId !== null) {
item.revert(
createRevertFunction(
state.options.server.url,
state.options.server.revert
),
query('GET_FORCE_REVERT')
);
}

// can now safely remove from view
removeFromView();
}
}),
Expand Down
4 changes: 2 additions & 2 deletions dist/filepond.esm.min.js

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion dist/filepond.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* FilePond 4.13.4
* FilePond 4.13.5
* Licensed under MIT, https://opensource.org/licenses/MIT/
* Please visit https://pqina.nl/filepond/ for details.
*/
Expand Down Expand Up @@ -7458,6 +7458,18 @@
}
);
} else {
// if is limbo item, need to call revert handler (not calling request_ because that would also trigger beforeRemoveHook)
if (item.origin === FileOrigin.LIMBO && item.serverId !== null) {
item.revert(
createRevertFunction(
state.options.server.url,
state.options.server.revert
),
query('GET_FORCE_REVERT')
);
}

// can now safely remove from view
removeFromView();
}
}),
Expand Down
4 changes: 2 additions & 2 deletions dist/filepond.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/filepond.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "filepond",
"version": "4.13.4",
"version": "4.13.5",
"description": "FilePond, Where files go to stretch their bits.",
"license": "MIT",
"author": {
Expand Down Expand Up @@ -66,4 +66,4 @@
"rollup-plugin-terser": "^4.0.4",
"typescript": "^3.6.2"
}
}
}
7 changes: 7 additions & 0 deletions src/css/modifiers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,10 @@

}

// dirfty way to fix circular overflow issue on safari 11+
@media not all and (min-resolution:.001dpcm)
{ @supports (-webkit-appearance:none) and (stroke-color:transparent) {
.filepond--root[data-style-panel-layout~='circle'] {
will-change: transform;
}
}}
6 changes: 6 additions & 0 deletions src/js/app/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,12 @@ export const actions = (dispatch, query, state) => ({
);
}
else {
// if is limbo item, need to call revert handler (not calling request_ because that would also trigger beforeRemoveHook)
if (item.origin === FileOrigin.LIMBO && item.serverId !== null) {
item.revert(createRevertFunction(state.options.server.url, state.options.server.revert), query('GET_FORCE_REVERT'))
}

// can now safely remove from view
removeFromView();
}

Expand Down

0 comments on commit 044a7ca

Please sign in to comment.