Skip to content

Commit b342e57

Browse files
authored
Remove option to lazy-load images (#2365)
Remove option to lazy-load images Lazy-loading option is introduced through the 'eager' prop in and components. Images are loaded as scrolling occurs, resulting in inaccurate scrolling as seen in issue #2364. Let's remove 'eager' prop from and components All images are now loaded eagerly.
1 parent 4dd8d72 commit b342e57

File tree

4 files changed

+0
-22
lines changed

4 files changed

+0
-22
lines changed

docs/userGuide/syntax/annotations.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ This is effectively the same as the options used for the [picture](#pictures) co
145145
| src | `string` | | **This must be specified.**<br>The URL of the image.<br>The URL can be specified as absolute or relative references. More info in: _[Intra-Site Links]({{baseUrl}}/userGuide/formattingContents.html#intraSiteLinks)_ |
146146
| height | `string` |`''`| The height of the image in pixels. |
147147
| width | `string` |`''`| The width of the image in pixels.<br>If both width and height are specified, width takes priority over height. It is to maintain the image's aspect ratio. |
148-
| eager | `boolean` | false | The `<pic>` component lazy loads its images by default.<br>If you want to eagerly load the images, simply specify this attribute. |
149148

150149
</div>
151150

docs/userGuide/syntax/pictures.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
<pic src="https://markbind.org/images/logo-lightbackground.png" width="300" alt="Logo">
99
MarkBind Logo
1010
</pic>
11-
12-
<pic src="https://markbind.org/images/logo-lightbackground.png" width="300" alt="Logo" eager>
13-
MarkBind Logo
14-
</pic>
1511
</variable>
1612
</include>
1713

@@ -22,7 +18,6 @@ alt | `string` | | **This must be specified.**<br>The alternative text of the im
2218
height | `string` | | The height of the image in pixels.
2319
src | `string` | | **This must be specified.**<br>The URL of the image.<br>The URL can be specified as absolute or relative references. More info in: _[Intra-Site Links]({{baseUrl}}/userGuide/formattingContents.html#intraSiteLinks)_
2420
width | `string` | | The width of the image in pixels.<br>If both width and height are specified, width takes priority over height. It is to maintain the image's aspect ratio.
25-
eager | `boolean` | false | The `<pic>` component lazy loads its images by default.<br>If you want to eagerly load the images, simply specify this attribute.
2621

2722
<div id="short" class="d-none">
2823

packages/vue-components/src/Pic.vue

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
:alt="alt"
77
:width="computedWidth"
88
class="img-fluid rounded"
9-
:loading="computedLoadType"
109
@load.once="computeWidth"
1110
/>
1211
<span class="image-caption">
@@ -36,10 +35,6 @@ export default {
3635
type: String,
3736
default: '',
3837
},
39-
eager: {
40-
type: Boolean,
41-
default: false,
42-
},
4338
addClass: {
4439
type: String,
4540
default: '',
@@ -58,9 +53,6 @@ export default {
5853
}
5954
return this.widthFromHeight;
6055
},
61-
computedLoadType() {
62-
return this.eager ? 'eager' : 'lazy';
63-
},
6456
},
6557
data() {
6658
return {

packages/vue-components/src/annotations/Annotate.vue

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
:alt="alt"
77
:width="computedWidth"
88
class="annotate-image"
9-
:loading="computedLoadType"
109
@load.once="getWidth"
1110
/>
1211
<div style="top: 0; left: 0; height: 0;">
@@ -36,10 +35,6 @@ export default {
3635
type: String,
3736
default: '',
3837
},
39-
eager: {
40-
type: Boolean,
41-
default: false,
42-
},
4338
addClass: {
4439
type: String,
4540
default: '',
@@ -58,9 +53,6 @@ export default {
5853
}
5954
return this.widthFromHeight;
6055
},
61-
computedLoadType() {
62-
return this.eager ? 'eager' : 'lazy';
63-
},
6456
},
6557
data() {
6658
return {

0 commit comments

Comments
 (0)