mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
small UI cleanups. sqrt for diameter.
This commit is contained in:
@@ -30,6 +30,10 @@ Template.details.party = function () {
|
||||
return Parties.findOne(Session.get("selected"));
|
||||
};
|
||||
|
||||
Template.details.anyParties = function () {
|
||||
return Parties.find().count() > 0;
|
||||
};
|
||||
|
||||
Template.details.creatorName = function () {
|
||||
var owner = Meteor.users.findOne(this.owner);
|
||||
if (owner._id === Meteor.userId())
|
||||
@@ -173,7 +177,7 @@ Template.map.rendered = function () {
|
||||
// XXX match area
|
||||
// (duplicated below)
|
||||
.attr("r", function (party) {
|
||||
return 10 + attending(party) * 10;
|
||||
return 10 + Math.sqrt(attending(party)) * 10;
|
||||
})
|
||||
.style("fill", function (party) {
|
||||
return party.public ? 'red' : 'blue';
|
||||
@@ -191,7 +195,7 @@ Template.map.rendered = function () {
|
||||
return party.y * 500;
|
||||
})
|
||||
.attr("r", function (party) {
|
||||
return 10 + attending(party) * 10;
|
||||
return 10 + Math.sqrt(attending(party)) * 8;
|
||||
})
|
||||
.style("fill", function (party) {
|
||||
return party.public ? 'red' : 'blue';
|
||||
@@ -256,7 +260,7 @@ Template.createDialog.events = {
|
||||
}, function (error, party) {
|
||||
if (! error) {
|
||||
Session.set("selected", party);
|
||||
if (! public)
|
||||
if (! public && Meteor.users.find().count() > 1)
|
||||
Session.set("showInviteDialog", true);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
{{displayName}}
|
||||
</div>
|
||||
{{else}}
|
||||
Everyone on the site has been invited.
|
||||
Everyone on the site has already been invited.
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,11 @@
|
||||
{{/with}}
|
||||
{{else}}
|
||||
<h1 class="muted pagination-centered">
|
||||
Click a party to select it
|
||||
{{#if anyParties}}
|
||||
Click a party to select it
|
||||
{{else}}
|
||||
Sign in and double click the map to post a party
|
||||
{{/if}}
|
||||
</h1>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user