Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
d5f9da6b
Commit
d5f9da6b
authored
Apr 18, 2013
by
Zachary Tong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `keylistener` service
parent
260cf9ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
js/services.js
+14
-1
panels/map2/module.js
+5
-3
No files found.
js/services.js
View file @
d5f9da6b
...
...
@@ -106,4 +106,17 @@ angular.module('kibana.services', [])
timers
=
new
Array
();
}
});
})
.
service
(
'keylistener'
,
function
(
$rootScope
)
{
var
keys
=
[];
$
(
document
).
keydown
(
function
(
e
)
{
console
.
log
(
"keydown"
,
e
.
which
);
keys
[
e
.
which
]
=
true
;
});
$
(
document
).
keyup
(
function
(
e
)
{
console
.
log
(
"keyup"
,
e
.
which
);
delete
keys
[
e
.
which
];
});
});
panels/map2/module.js
View file @
d5f9da6b
angular
.
module
(
'kibana.map2'
,
[])
.
controller
(
'map2'
,
function
(
$scope
,
eventBus
)
{
.
controller
(
'map2'
,
function
(
$scope
,
eventBus
,
keylistener
)
{
// Set and populate defaults
var
_d
=
{
...
...
@@ -413,14 +413,16 @@ angular.module('kibana.map2', [])
//@todo implement a global "keypress service", since this fails if there are >1 spheres
if
(
scope
.
panel
.
display
.
data
.
type
===
'orthographic'
)
{
window
.
focus
();
d3
.
select
(
window
)
//scope.svg.focus();
/*
scope.svg.selectAll(".overlay")
.on("keydown", function() {
scope.ctrlKey = d3.event.ctrlKey;
})
.on("keyup", function() {
scope.ctrlKey = d3.event.ctrlKey;
});
*/
scope
.
svg
.
style
(
"cursor"
,
"move"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment