Commit 6921db1b authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'scrollable-design-view' into 'master'

Scrollable design view (#13217 part 1)

See merge request gitlab-org/gitlab!22942
parents 2f5848ad db296a61
...@@ -89,7 +89,8 @@ export default { ...@@ -89,7 +89,8 @@ 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">
<div class="h-100 w-100 d-flex align-items-center position-relative">
<design-image v-if="image" :image="image" :name="imageName" @resize="onImageResize" /> <design-image v-if="image" :image="image" :name="imageName" @resize="onImageResize" />
<design-overlay <design-overlay
v-if="overlayDimensions && overlayPosition" v-if="overlayDimensions && overlayPosition"
...@@ -100,4 +101,5 @@ export default { ...@@ -100,4 +101,5 @@ export default {
@openCommentForm="openCommentForm" @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 h-100 w-100 d-flex-center 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,18 +2,25 @@ ...@@ -2,18 +2,25 @@
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"
> >
<div
class="h-100 w-100 d-flex align-items-center position-relative"
>
<design-image-stub <design-image-stub
image="test.jpg" image="test.jpg"
name="test" name="test"
...@@ -24,5 +31,6 @@ exports[`Design management design presentation component renders image and overl ...@@ -24,5 +31,6 @@ exports[`Design management design presentation component renders image and overl
notes="" notes=""
position="[object Object]" 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 h-100 w-100 d-flex-center 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 h-100 w-100 d-flex-center 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