layerchart 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,7 @@ const { width, height, padding } = getContext('LayerCake');
8
8
  y={-$padding.top}
9
9
  width={$width + $padding.left + $padding.right}
10
10
  height={$height + $padding.top + $padding.bottom}
11
+ on:click
11
12
  {...$$restProps}
12
13
  >
13
14
  <slot />
@@ -4,6 +4,8 @@ declare const __propDef: {
4
4
  [x: string]: any;
5
5
  };
6
6
  events: {
7
+ click: MouseEvent;
8
+ } & {
7
9
  [evt: string]: CustomEvent<any>;
8
10
  };
9
11
  slots: {
@@ -15,7 +15,7 @@ export let tweened = undefined;
15
15
  </ClipPath>
16
16
 
17
17
  {#if $$slots.default}
18
- <g style="clip-path: url(#{id})">
18
+ <g style="clip-path: url(#{id})" on:click>
19
19
  <slot {id} />
20
20
  </g>
21
21
  {/if}
@@ -10,6 +10,8 @@ declare const __propDef: {
10
10
  tweened?: boolean | Parameters<typeof tweenedStore>[1];
11
11
  };
12
12
  events: {
13
+ click: MouseEvent;
14
+ } & {
13
15
  [evt: string]: CustomEvent<any>;
14
16
  };
15
17
  slots: {
@@ -16,7 +16,7 @@ export let tweened = undefined;
16
16
  </ClipPath>
17
17
 
18
18
  {#if $$slots.default}
19
- <g style="clip-path: url(#{id})">
19
+ <g style="clip-path: url(#{id})" on:click>
20
20
  <slot {id} />
21
21
  </g>
22
22
  {/if}
@@ -11,6 +11,8 @@ declare const __propDef: {
11
11
  tweened?: boolean | Parameters<typeof tweenedStore>[1];
12
12
  };
13
13
  events: {
14
+ click: MouseEvent;
15
+ } & {
14
16
  [evt: string]: CustomEvent<any>;
15
17
  };
16
18
  slots: {
@@ -114,16 +114,20 @@ $: newTranslate = {
114
114
  };
115
115
  </script>
116
116
 
117
- <rect
118
- x={-$padding.left}
119
- y={-$padding.top}
120
- width={$width + $padding.left + $padding.right}
121
- height={$height + $padding.top + $padding.bottom}
117
+ <g
122
118
  on:mousewheel={handleWheel}
123
119
  on:mousedown={handleMouseDown}
124
120
  on:dblclick={handleDoubleClick}
125
- fill="transparent"
126
- />
127
- <g transform="translate({newTranslate.x},{newTranslate.y}) scale({$scale.x},{$scale.y})">
128
- <slot scale={$scale} />
121
+ on:click
122
+ >
123
+ <rect
124
+ x={-$padding.left}
125
+ y={-$padding.top}
126
+ width={$width + $padding.left + $padding.right}
127
+ height={$height + $padding.top + $padding.bottom}
128
+ fill="transparent"
129
+ />
130
+ <g transform="translate({newTranslate.x},{newTranslate.y}) scale({$scale.x},{$scale.y})">
131
+ <slot scale={$scale} />
132
+ </g>
129
133
  </g>
@@ -18,6 +18,8 @@ declare const __propDef: {
18
18
  }) => void;
19
19
  };
20
20
  events: {
21
+ click: MouseEvent;
22
+ } & {
21
23
  [evt: string]: CustomEvent<any>;
22
24
  };
23
25
  slots: {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Sean Lynch <techniq35@gmail.com>",
4
4
  "license": "MIT",
5
5
  "repository": "techniq/layerchart",
6
- "version": "0.6.2",
6
+ "version": "0.6.3",
7
7
  "devDependencies": {
8
8
  "@rollup/plugin-dsv": "^2.0.3",
9
9
  "@sveltejs/adapter-vercel": "^1.0.0-next.58",