Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/modules/esl-image/README.md
  • Loading branch information
ala-n committed Jan 27, 2021
2 parents 4775ac4 + 7d3403d commit 7c237b0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [1.1.0](https://github.com/exadel-inc/esl/compare/v1.0.1...v1.1.0) (2021-01-27)


### Features

* add originalWidth / originalHeight accessors to ESLImage ([365e31b](https://github.com/exadel-inc/esl/commit/365e31b78db67b4bbc335c17078b117459753aa4))

## [1.0.1](https://github.com/exadel-inc/esl/compare/v1.0.0...v1.0.1) (2021-01-18)


Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"lightweight",
"flexible"
],
"version": "1.0.1",
"version": "1.1.0",
"private": true,
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/esl-image/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [ESL](../../../README.md) Image

Version: *1.0.0*
Version: *1.1.0*

Authors: *Alexey Stsefanovich (ala'n)*, *Yuliya Adamskaya*.

Expand Down
8 changes: 8 additions & 0 deletions src/modules/esl-image/core/esl-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ export class ESLImage extends ESLBaseElement {
return this.lazy !== 'none' && this.lazy !== 'manual';
}

public get originalWidth() {
return this._shadowImageElement ? this._shadowImageElement.width : 0;
}

public get originalHeight() {
return this._shadowImageElement ? this._shadowImageElement.height : 0;
}

public triggerLoad() {
this.setAttribute('lazy-triggered', '');
}
Expand Down

0 comments on commit 7c237b0

Please sign in to comment.