Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: desoi/ace
...
head fork: desoi/ace
Checking mergeability… Don't worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Nov 17, 2011
@zefhemel zefhemel Added optional 'onclick' and 'ondblclick' attributes to annotations in
the gutter. Value is Javascript string to be executed when clicked.
1a5320f
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/ace/layer/gutter.js
View
7 lib/ace/layer/gutter.js
@@ -92,6 +92,11 @@ var Gutter = function(parentEl) {
rowInfo.className = "ace_warning";
else if (type == "info" && (!rowInfo.className))
rowInfo.className = "ace_info";
+
+ if(annotation.onclick)
+ rowInfo.onclick = annotation.onclick;
+ if(annotation.ondblclick)
+ rowInfo.ondblclick = annotation.ondblclick;
}
}
};
@@ -121,6 +126,8 @@ var Gutter = function(parentEl) {
this.$breakpoints[i] ? " ace_breakpoint " : " ",
annotation.className,
"' title='", annotation.text.join("\n"),
+ annotation.onclick ? "' onclick='" + annotation.onclick : "",
+ annotation.ondblclick ? "' ondblclick='" + annotation.ondblclick : "",
"' style='height:", config.lineHeight, "px;'>", (i+1));
var wrappedRowLength = this.session.getRowLength(i) - 1;

No commit comments for this range

Something went wrong with that request. Please try again.