Commit 556d3d2e authored by Tom Quirk's avatar Tom Quirk

Add scrollability to design view

Instead of a "no-overflow" implementation,
designs can now safely overflow vertically, and the user
is able to scroll to explore the image vertically
parent f4393ced
...@@ -89,15 +89,17 @@ export default { ...@@ -89,15 +89,17 @@ export default {
</script> </script>
<template> <template>
<div ref="presentationViewport" class="d-flex flex-column h-100 mh-100 position-relative"> <div ref="presentationViewport" class="h-100 w-100 p-3 overflow-auto">
<design-image v-if="image" :image="image" :name="imageName" @resize="onImageResize" /> <div class="h-100 w-100 d-flex align-items-center position-relative">
<design-overlay <design-image v-if="image" :image="image" :name="imageName" @resize="onImageResize" />
v-if="overlayDimensions && overlayPosition" <design-overlay
:dimensions="overlayDimensions" v-if="overlayDimensions && overlayPosition"
:position="overlayPosition" :dimensions="overlayDimensions"
:notes="discussionStartingNotes" :position="overlayPosition"
:current-comment-form="currentCommentForm" :notes="discussionStartingNotes"
@openCommentForm="openCommentForm" :current-comment-form="currentCommentForm"
/> @openCommentForm="openCommentForm"
/>
</div>
</div> </div>
</template> </template>
...@@ -52,13 +52,7 @@ export default { ...@@ -52,13 +52,7 @@ export default {
</script> </script>
<template> <template>
<div class="d-flex align-items-center h-100 w-100 p-3 overflow-hidden js-design-image"> <div class="m-auto js-design-image">
<img <img ref="contentImg" :src="image" :alt="name" class="img-fluid mh-100" @load="onImgLoad" />
ref="contentImg"
:src="image"
:alt="name"
class="ml-auto mr-auto img-fluid mh-100 design-image"
@load="onImgLoad"
/>
</div> </div>
</template> </template>
...@@ -2,27 +2,35 @@ ...@@ -2,27 +2,35 @@
exports[`Design management design presentation component renders empty state when no image provided 1`] = ` exports[`Design management design presentation component renders empty state when no image provided 1`] = `
<div <div
class="d-flex flex-column h-100 mh-100 position-relative" class="h-100 w-100 p-3 overflow-auto"
> >
<!----> <div
class="h-100 w-100 d-flex align-items-center position-relative"
<!----> >
<!---->
<!---->
</div>
</div> </div>
`; `;
exports[`Design management design presentation component renders image and overlay when image provided 1`] = ` exports[`Design management design presentation component renders image and overlay when image provided 1`] = `
<div <div
class="d-flex flex-column h-100 mh-100 position-relative" class="h-100 w-100 p-3 overflow-auto"
> >
<design-image-stub <div
image="test.jpg" class="h-100 w-100 d-flex align-items-center position-relative"
name="test" >
/> <design-image-stub
image="test.jpg"
<design-overlay-stub name="test"
dimensions="[object Object]" />
notes=""
position="[object Object]" <design-overlay-stub
/> dimensions="[object Object]"
notes=""
position="[object Object]"
/>
</div>
</div> </div>
`; `;
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
exports[`Design management large image component renders image 1`] = ` exports[`Design management large image component renders image 1`] = `
<div <div
class="d-flex align-items-center h-100 w-100 p-3 overflow-hidden js-design-image" class="m-auto js-design-image"
> >
<img <img
alt="test" alt="test"
class="ml-auto mr-auto img-fluid mh-100 design-image" class="img-fluid mh-100"
src="test.jpg" src="test.jpg"
/> />
</div> </div>
...@@ -14,12 +14,12 @@ exports[`Design management large image component renders image 1`] = ` ...@@ -14,12 +14,12 @@ exports[`Design management large image component renders image 1`] = `
exports[`Design management large image component renders loading state 1`] = ` exports[`Design management large image component renders loading state 1`] = `
<div <div
class="d-flex align-items-center h-100 w-100 p-3 overflow-hidden js-design-image" class="m-auto js-design-image"
isloading="true" isloading="true"
> >
<img <img
alt="" alt=""
class="ml-auto mr-auto img-fluid mh-100 design-image" class="img-fluid mh-100"
src="" src=""
/> />
</div> </div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment