mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-07 20:17:42 +08:00
add chart example
This commit is contained in:
@ -50,31 +50,33 @@ Canvas {
|
||||
mouseEvent.left = 0;
|
||||
mouseEvent.top = 0;
|
||||
mouseEvent.target = control;
|
||||
|
||||
if(handler) {
|
||||
handler(mouseEvent);
|
||||
}
|
||||
|
||||
control.requestPaint();
|
||||
}
|
||||
onClicked:(mouse)=> {
|
||||
submitEvent(mouse, "click");
|
||||
}
|
||||
onPositionChanged:(mouse)=> {
|
||||
submitEvent(mouse, "mousemove");
|
||||
}
|
||||
onClicked:
|
||||
(mouse)=> {
|
||||
submitEvent(mouse, "click");
|
||||
}
|
||||
onPositionChanged:
|
||||
(mouse)=> {
|
||||
submitEvent(mouse, "mousemove");
|
||||
}
|
||||
onExited: {
|
||||
submitEvent(undefined, "mouseout");
|
||||
}
|
||||
onEntered: {
|
||||
submitEvent(undefined, "mouseenter");
|
||||
}
|
||||
onPressed:(mouse)=> {
|
||||
submitEvent(mouse, "mousedown");
|
||||
}
|
||||
onReleased:(mouse)=> {
|
||||
submitEvent(mouse, "mouseup");
|
||||
}
|
||||
onPressed:
|
||||
(mouse)=> {
|
||||
submitEvent(mouse, "mousedown");
|
||||
}
|
||||
onReleased:
|
||||
(mouse)=> {
|
||||
submitEvent(mouse, "mouseup");
|
||||
}
|
||||
}
|
||||
PropertyAnimation {
|
||||
id: chartAnimator
|
||||
|
9
src/Qt5/imports/FluentUI/JS/Chart.js
vendored
9
src/Qt5/imports/FluentUI/JS/Chart.js
vendored
@ -1618,10 +1618,6 @@ function hwbString(hwb, alpha) {
|
||||
+ (alpha !== undefined && alpha !== 1 ? ", " + alpha : "") + ")";
|
||||
}
|
||||
|
||||
function keyword(rgb) {
|
||||
return reverseNames[rgb.slice(0, 3)];
|
||||
}
|
||||
|
||||
// helpers
|
||||
function scale(num, min, max) {
|
||||
return Math.min(Math.max(min, num), max);
|
||||
@ -1632,13 +1628,16 @@ function hexDouble(num) {
|
||||
return (str.length < 2) ? "0" + str : str;
|
||||
}
|
||||
|
||||
|
||||
//create a list of reverse color names
|
||||
var reverseNames = {};
|
||||
for (var name in colorName$1) {
|
||||
reverseNames[colorName$1[name]] = name;
|
||||
}
|
||||
|
||||
function keyword(rgb) {
|
||||
return reverseNames[rgb.slice(0, 3)];
|
||||
}
|
||||
|
||||
/* MIT license */
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user