Index: sky/examples/color/color-wheel.sky |
diff --git a/sky/examples/color/color-wheel.sky b/sky/examples/color/color-wheel.sky |
index be053749d20da63a7128ee1325faad94433fa021..da10a116c8b9050edefac17bdd3f02f0069a956d 100644 |
--- a/sky/examples/color/color-wheel.sky |
+++ b/sky/examples/color/color-wheel.sky |
@@ -7,8 +7,7 @@ |
<sky-element name="color-wheel" |
attributes="color:string" |
- on-pointerdown="handlePointerDown" |
- on-pointermove="handlePointerMove"> |
+ on-pointerdown="handlePointerDown"> |
<template> |
<style> |
img { |
@@ -65,6 +64,12 @@ module.exports = class extends SkyElement { |
created() { |
super.created(); |
this.color = "#xFF00FF"; |
+ this.colorChanged = function() { |
+ this.dispatchEvent(new CustomEvent('color-change', { |
+ bubbles: true, |
+ detail: this.color, |
+ })); |
+ }; |
} |
updateColor(event) { |
var bounds = event.target.getBoundingClientRect(); |
@@ -78,9 +83,6 @@ module.exports = class extends SkyElement { |
handlePointerDown(event) { |
this.updateColor(event); |
} |
- handlePointerMove(event) { |
- this.updateColor(event); |
- } |
}.register(); |
</script> |
</sky-element> |