2021-09-17 12:17:43 +02:00
|
|
|
import BootstrapModal from "plugins/modal/base.js";
|
2020-12-01 18:50:35 +01:00
|
|
|
import tpl_image_modal from "./templates/image.js";
|
2020-07-14 15:45:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
export default BootstrapModal.extend({
|
2020-12-02 18:37:32 +01:00
|
|
|
id: 'image-modal',
|
|
|
|
|
2020-07-14 15:45:16 +02:00
|
|
|
toHTML () {
|
2020-10-13 15:35:54 +02:00
|
|
|
return tpl_image_modal({
|
|
|
|
'src': this.src,
|
|
|
|
'onload': ev => (ev.target.parentElement.style.height = `${ev.target.height}px`)
|
|
|
|
});
|
2020-07-14 15:45:16 +02:00
|
|
|
}
|
|
|
|
});
|