@atlaskit/editor-plugin-media 0.3.2 → 0.3.3

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 0.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#41425](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41425) [`130e8656e37`](https://bitbucket.org/atlassian/atlassian-frontend/commits/130e8656e37) - Fixed bug where media single node was shrinking unexpectedly inside table cell.
8
+
3
9
  ## 0.3.2
4
10
 
5
11
  ### Patch Changes
@@ -66,9 +66,11 @@ var MediaNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
66
66
  }
67
67
  width = width || _mediaSingle.DEFAULT_IMAGE_WIDTH;
68
68
  height = height || _mediaSingle.DEFAULT_IMAGE_HEIGHT;
69
+
70
+ // mediaSingle defines the max dimensions, so we don't need to constrain twice.
69
71
  var maxDimensions = {
70
- width: "".concat(editorWidth.width, "px"),
71
- height: "".concat(height / width * editorWidth.width, "px")
72
+ width: "100%",
73
+ height: "100%"
72
74
  };
73
75
  var originalDimensions = {
74
76
  width: width,
@@ -52,9 +52,11 @@ class MediaNodeView extends SelectionBasedNodeView {
52
52
  }
53
53
  width = width || DEFAULT_IMAGE_WIDTH;
54
54
  height = height || DEFAULT_IMAGE_HEIGHT;
55
+
56
+ // mediaSingle defines the max dimensions, so we don't need to constrain twice.
55
57
  const maxDimensions = {
56
- width: `${editorWidth.width}px`,
57
- height: `${height / width * editorWidth.width}px`
58
+ width: `100%`,
59
+ height: `100%`
58
60
  };
59
61
  const originalDimensions = {
60
62
  width,
@@ -59,9 +59,11 @@ var MediaNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
59
59
  }
60
60
  width = width || DEFAULT_IMAGE_WIDTH;
61
61
  height = height || DEFAULT_IMAGE_HEIGHT;
62
+
63
+ // mediaSingle defines the max dimensions, so we don't need to constrain twice.
62
64
  var maxDimensions = {
63
- width: "".concat(editorWidth.width, "px"),
64
- height: "".concat(height / width * editorWidth.width, "px")
65
+ width: "100%",
66
+ height: "100%"
65
67
  };
66
68
  var originalDimensions = {
67
69
  width: width,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",