Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "ColorPicker: internal ref issue was fixed, which lets colors be picked a little better.",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
"email": "law@microsoft.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class ColorRectangle extends BaseComponent<IColorRectangleProps, IColorPi
minSize: 220
};

private root: HTMLDivElement;
private _root: HTMLDivElement;

constructor(props: IColorRectangleProps) {
super(props);
Expand Down Expand Up @@ -87,7 +87,7 @@ export class ColorRectangle extends BaseComponent<IColorRectangleProps, IColorPi
@autobind
private _onMouseMove(ev: React.MouseEvent<HTMLElement>) {
const { color, onSVChanged } = this.props;
const rectSize = this.root.getBoundingClientRect();
const rectSize = this._root.getBoundingClientRect();

const sPercentage = (ev.clientX - rectSize.left) / rectSize.width;
const vPercentage = (ev.clientY - rectSize.top) / rectSize.height;
Expand Down