cursor has site color

This commit is contained in:
Ben Ogle
2013-07-26 14:44:32 -07:00
parent e07f92c4ee
commit 5b267f4a3f
2 changed files with 13 additions and 4 deletions

View File

@@ -30,6 +30,9 @@ class CursorView extends View
@cursor.on 'destroyed.cursor-view', =>
@needsRemoval = true
if @cursor.marker.isRemote()
@addClass("site-#{@cursor.marker.getOriginSiteId()}")
remove: ->
@editor.removeCursorView(this)
@cursor.off('.cursor-view')

View File

@@ -7,15 +7,21 @@
@site-4-color: #f4541e;
.site-colors(@site, @color) {
.site-@{site} {
background-color: @color;
&.lighter {
background-color: lighten(@color, 30%);
.collaboration-participant{
.site-@{site} {
background-color: @color;
&.lighter {
background-color: lighten(@color, 30%);
}
}
}
.editor .selection.site-@{site} .region {
background-color: darken(@color, 30%);
}
.editor .cursor.site-@{site} {
border-color: @color;
border-width: 2px;
}
}
.site-colors(1, @site-1-color);