Skip to content

Commit 6d3856c

Browse files
committed
Remove wrapper class
1 parent 0b37e12 commit 6d3856c

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

examples/index.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
<html lang="en">
33
<head>
44
<style>
5-
.wrapper {
6-
margin: 30px auto;
7-
}
85
.loading {
96
background: #f0f0f0;
107
text-align: center;
@@ -18,7 +15,7 @@
1815
<title>image-crop-element demo</title>
1916
</head>
2017
<body>
21-
<image-crop src="./ams.jpg" class="wrapper" tabindex="0">
18+
<image-crop src="./ams.jpg" tabindex="0">
2219
<div data-loading-slot class="loading">loading</div>
2320
<input type="text" data-image-crop-input="x" name="x" size="4" aria-label="x">
2421
<input type="text" data-image-crop-input="y" name="y" size="4" aria-label="y">

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ class ImageCropElement extends HTMLElement {
269269
:host .se { bottom: 0; right: 0; cursor: nwse-resize; }
270270
:host .sw { bottom: 0; left: 0; cursor: nesw-resize; }
271271
</style>
272+
<slot></slot>
272273
<div class="crop-wrapper">
273274
<img width="100%" class="crop-image" alt="">
274275
<div class="crop-container">
@@ -281,7 +282,6 @@ class ImageCropElement extends HTMLElement {
281282
</div>
282283
</div>
283284
</div>
284-
<slot></slot>
285285
`
286286

287287
const box = shadowRoot.querySelector('[data-crop-box]')

0 commit comments

Comments
 (0)