fin-hypergrid
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ module.exports = { |
@@ -0,0 +0,0 @@ /* eslint-env browser */ |
{ | ||
"name": "fin-hypergrid", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Canvas-based high-performance grid", | ||
@@ -5,0 +5,0 @@ "main": "src/Hypergrid", |
@@ -11,3 +11,3 @@ [![Build Status](https://travis-ci.org/openfin/fin-hypergrid.svg?branch=develop)](https://travis-ci.org/openfin/fin-hypergrid) | ||
## Table of Contents | ||
* [Current Release](#current-release-300---7-july-2018) | ||
* [Current Release](#current-release-301---10-july-2018) | ||
* [Distribution](#distribution) | ||
@@ -21,5 +21,5 @@ * [Demos](#demos) | ||
### Current Release (3.0.0 - 7 July 2018) | ||
### Current Release (3.0.1 - 10 July 2018) | ||
**Hypergrid 3.0.0 includes a revised data model with some breaking changes.** | ||
**Hypergrid 3.0 includes a revised data model with some breaking changes.** | ||
@@ -31,3 +31,3 @@ _For a complete list of changes, see the [release notes](https://github.com/fin-hypergrid/core/releases)._ | ||
#### npm module | ||
Published as a CommonJS module to npmjs.org. Specify SEMVER `"fin-hypergrid": "3.0.0"` (or `"^3.0.0"`) in your package.json file, issue the `npm install` command, and let your bundler (wepback, Browserify) do the rest. | ||
Published as a CommonJS module to npmjs.org. Specify SEMVER `"fin-hypergrid": "3.0.1"` (or `"^3.0.1"`) in your package.json file, issue the `npm install` command, and let your bundler (wepback, Browserify) do the rest. | ||
@@ -34,0 +34,0 @@ #### Build file |
@@ -0,0 +0,0 @@ /* globals alert */ |
@@ -243,2 +243,4 @@ 'use strict'; | ||
this.columnsCreated = false; | ||
schema[tc] = schema[tc] || {}; | ||
@@ -329,2 +331,4 @@ schema[tc].index = tc; | ||
this.columnsCreated = true; | ||
this.changed(); | ||
@@ -331,0 +335,0 @@ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ /* eslint-env browser */ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -203,4 +203,5 @@ 'use strict'; | ||
Local.prototype.mixIn(require('../columnEnum').mixin); | ||
Local.prototype.mixIn(require('./columnEnum').mixin); | ||
Local.prototype.mixIn.call(Local, require('./columnEnum').mixInShared); | ||
module.exports = Local; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ /* eslint-env browser */ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ /* eslint-env browser */ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
'use strict'; | ||
var CellRenderer = require('./CellRenderer'); | ||
var Rectangle = require('rectangular').Rectangle; | ||
var images = require('../../images'); | ||
@@ -137,10 +138,16 @@ | ||
: renderSingleLineText(gc, config, val, leftPadding, rightPadding); | ||
} else if (centerIcon) { | ||
} | ||
if (centerIcon) { | ||
// Measure & draw center icon | ||
iyoffset = Math.round((height - centerIcon.height) / 2); | ||
ixoffset = Math.round((width - centerIcon.width) / 2); | ||
gc.drawImage(centerIcon, x + width - ixoffset - centerIcon.width, y + iyoffset); | ||
ixoffset = width - Math.round((width - centerIcon.width) / 2) - centerIcon.width; | ||
gc.drawImage(centerIcon, x + ixoffset, y + iyoffset); | ||
valWidth = iconPadding + centerIcon.width + iconPadding; | ||
if (config.hotIcon === 'center') { | ||
config.clickRect = new Rectangle(ixoffset, iyoffset, centerIcon.width, centerIcon.height); | ||
} | ||
} | ||
if (leftIcon) { | ||
@@ -150,2 +157,5 @@ // Draw left icon | ||
gc.drawImage(leftIcon, x + iconPadding, y + iyoffset); | ||
if (config.hotIcon === 'left') { | ||
config.clickRect = new Rectangle(iconPadding, iyoffset, leftIcon.width, leftIcon.height); | ||
} | ||
} | ||
@@ -156,3 +166,4 @@ | ||
// This is a work-around to clipping which is too expensive to perform here. | ||
var rightX = x + width - (rightIcon.width + iconPadding); | ||
ixoffset = width - (rightIcon.width + iconPadding); | ||
var rightX = x + ixoffset; | ||
if (inheritsBackgroundColor) { | ||
@@ -167,2 +178,5 @@ foundationColor = true; | ||
gc.drawImage(rightIcon, rightX, y + iyoffset); | ||
if (config.hotIcon === 'right') { | ||
config.clickRect = new Rectangle(ixoffset, iyoffset, rightIcon.width, rightIcon.height); | ||
} | ||
} | ||
@@ -169,0 +183,0 @@ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ /* eslint-env browser */ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -70,3 +70,6 @@ 'use strict'; | ||
var leftClick = !event.primitiveEvent.detail.isRightClick, | ||
rowNumberClick = leftClick && grid.properties.showRowNumbers && event.isHandleColumn; | ||
rowNumberClick = leftClick && | ||
grid.properties.showRowNumbers && | ||
event.isHandleColumn && | ||
event.mousePointInClickRect; | ||
@@ -439,5 +442,4 @@ if (rowNumberClick && !grid.fireSyntheticRowHeaderClickedEvent(event)) { | ||
} | ||
} | ||
module.exports = RowSelection; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -6,2 +6,3 @@ /* eslint-env browser */ | ||
var dispatchGridEvent = require('../lib/dispatchGridEvent'); | ||
var Button = require('../cellRenderers/Button'); | ||
@@ -185,3 +186,3 @@ /** | ||
fireSyntheticRowHeaderClickedEvent: function(event) { | ||
return dispatchEvent.call(this, 'fin-row-header-clicked', true, {}, event); | ||
return dispatchGridEvent.call(this, 'fin-row-header-clicked', true, {}, event); | ||
}, | ||
@@ -253,3 +254,3 @@ | ||
fireSyntheticButtonPressedEvent: function(event) { | ||
if (event.properties.renderer === 'button') { | ||
if (event.cellRenderer instanceof Button) { // Button or subclass thereof? | ||
if (event.value && event.value.subrows) { | ||
@@ -506,10 +507,6 @@ var y = event.primitiveEvent.detail.mouse.y - event.bounds.y, | ||
var isMouseDownCell = this.mouseDownState && this.mouseDownState.gridCell.equals(mouseEvent.gridCell); | ||
if ( | ||
isMouseDownCell && | ||
isMousePointInClickRect(mouseEvent) | ||
) { | ||
if (isMouseDownCell && mouseEvent.mousePointInClickRect) { | ||
mouseEvent.keys = e.detail.keys; // todo: this was in fin-tap but wasn't here | ||
if (this.mouseDownState) { | ||
this.fireSyntheticButtonPressedEvent(this.mouseDownState); | ||
this.mouseDownState = null; | ||
} | ||
@@ -519,2 +516,3 @@ this.fireSyntheticClickEvent(mouseEvent); | ||
} | ||
this.mouseDownState = null; | ||
}); | ||
@@ -699,5 +697,1 @@ }); | ||
}; | ||
function isMousePointInClickRect(e) { | ||
return !e.clickRect || e.clickRect.contains(e.mousePoint); | ||
} |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ /* eslint-env browser */ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ /* eslint-env browser */ |
@@ -278,2 +278,18 @@ 'use strict'; | ||
mousePointInClickRect: { | ||
get: function() { | ||
var clickRect = 'clickRect' in this ? this.clickRect : this.properties.clickRect; | ||
if (!clickRect) { | ||
return true; | ||
} else if (typeof clickRect.contains === 'function') { | ||
return clickRect.contains(this.mousePoint); | ||
} else { | ||
return ( | ||
clickRect.x <= this.mousePoint.x && this.mousePoint.x < clickRect.x + clickRect.width && | ||
clickRect.y <= this.mousePoint.y && this.mousePoint.y < clickRect.y + clickRect.height | ||
); | ||
} | ||
} | ||
}, | ||
/** "Visible" means scrolled into view. | ||
@@ -280,0 +296,0 @@ * @type {boolean} |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ /* globals CustomEvent */ |
@@ -0,0 +0,0 @@ /* eslint-env browser */ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ /* eslint-env browser */ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ /* eslint-env browser */ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -1059,2 +1059,3 @@ /* eslint-env browser */ | ||
cellEvent.clickRect = config.clickRect; | ||
cellEvent.cellRenderer = cellRenderer; // renderer actually used per getCell; used by fireSyntheticButtonPressedEvent | ||
@@ -1061,0 +1062,0 @@ return config.minWidth; |
@@ -0,0 +0,0 @@ 'use strict'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
754119
18244