@khanacademy/perseus-editor 2.5.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/es/index.js +2 -2
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/widgets/image-editor.tsx +19 -13
- package/tsconfig-build.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Perseus editors",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.6.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@khanacademy/kas": "^0.3.1",
|
|
25
25
|
"@khanacademy/kmath": "^0.1.1",
|
|
26
|
-
"@khanacademy/perseus": "^7.
|
|
26
|
+
"@khanacademy/perseus": "^7.2.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@khanacademy/wonder-blocks-button": "^4.0.8",
|
|
@@ -97,18 +97,20 @@ const ImageEditor: any = createReactClass({
|
|
|
97
97
|
|
|
98
98
|
const imageSettings = (
|
|
99
99
|
<div className="image-settings">
|
|
100
|
-
|
|
101
|
-
<
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
100
|
+
{!Util.isLabeledSVG(backgroundImage.url) && (
|
|
101
|
+
<div>
|
|
102
|
+
<label>
|
|
103
|
+
<div>Preview:</div>
|
|
104
|
+
<img
|
|
105
|
+
alt="Editor preview of image"
|
|
106
|
+
src={backgroundImage.url}
|
|
107
|
+
style={{
|
|
108
|
+
width: "100%",
|
|
109
|
+
}}
|
|
110
|
+
/>
|
|
111
|
+
</label>
|
|
112
|
+
</div>
|
|
113
|
+
)}
|
|
112
114
|
<div>
|
|
113
115
|
<label>
|
|
114
116
|
<div>Dimensions:</div>
|
|
@@ -327,7 +329,11 @@ const ImageEditor: any = createReactClass({
|
|
|
327
329
|
this.setUrl(url, size[0], size[1], true);
|
|
328
330
|
} catch (error) {
|
|
329
331
|
this.setState({
|
|
330
|
-
backgroundImageError: `There was an error loading the image URL: ${
|
|
332
|
+
backgroundImageError: `There was an error loading the image URL: ${JSON.stringify(
|
|
333
|
+
error,
|
|
334
|
+
null,
|
|
335
|
+
2,
|
|
336
|
+
)}`,
|
|
331
337
|
});
|
|
332
338
|
}
|
|
333
339
|
},
|