forked from fin-hypergrid/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added doubleclick on column header for autosizing
- Loading branch information
1 parent
2df6fea
commit 2cd0c58
Showing
19 changed files
with
17,188 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
polymer/css/features/fin-hypergrid-feature-column-autosizing.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
:host { | ||
display: block; | ||
position: relative; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
polymer/html/features/fin-hypergrid-feature-column-autosizing.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!-- | ||
The `fin-hypergrid-feature-column-autosizing` element is a custom Polymer web component | ||
@element fin-hypergrid-feature-column-autosizing | ||
--> | ||
<polymer-element name="fin-hypergrid-feature-column-autosizing" extends="fin-hypergrid-feature-base"> | ||
<template> | ||
<link rel="stylesheet" type="text/css" href="../../../polymer/css/features/fin-hypergrid-feature-column-autosizing.css"> | ||
</template> | ||
<script src="../../../polymer/js/features/fin-hypergrid-feature-column-autosizing.js"></script> | ||
</polymer-element> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
polymer/js/features/fin-hypergrid-feature-column-autosizing.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'use strict'; | ||
|
||
(function() { | ||
|
||
Polymer('fin-hypergrid-feature-column-autosizing', { /* jshint ignore:line */ | ||
handleDoubleClick: function(grid, event) { | ||
var fixedRowCount = grid.getFixedRowCount(); | ||
var fixedColCount = grid.getFixedColumnCount(); | ||
var gridCell = event.gridCell; | ||
if (gridCell.y <= fixedRowCount) { | ||
var col = grid.getHScrollValue() + gridCell.x - fixedColCount; | ||
grid.autosizeColumn(col); | ||
} else if (this.next) { | ||
this.next.handleDoubleClick(grid, event); | ||
} | ||
} | ||
}); | ||
|
||
})(); /* jshint ignore:line */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* globals describe, it, assert */ | ||
|
||
'use strict'; | ||
|
||
var customElement = document.querySelector('fin-hypergrid-feature-column-autosizing'); | ||
|
||
describe('<fin-hypergrid-feature-column-autosizing>', function() { | ||
|
||
describe('features/fin-hypergrid-feature-column-autosizing.js', function() { | ||
it('should have real tests filled out', function() { | ||
assert.equal(customElement, customElement); | ||
}); | ||
|
||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters