Skip to content

Adding a bezel to the wall in Web Interface#146

Merged
ppodhajski merged 3 commits intoBlueBrain:masterfrom
ppodhajski:feature/bezels
May 5, 2017
Merged

Adding a bezel to the wall in Web Interface#146
ppodhajski merged 3 commits intoBlueBrain:masterfrom
ppodhajski:feature/bezels

Conversation

@ppodhajski
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread tide/master/resources/js/tide.js Outdated
for (var j = 0; j < totalDisplaysPerScreen; j++)
div.append("<div class='bezel'></div>");

$(".bezel").css("grid-column-gap", bezelWidth).css("grid-row-gap", bezelHeight).hide();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be out of the for-loop?

Comment thread tide/master/resources/js/tide.js Outdated

var totalScreens = screenCountX * screenCountY;
var displayPerScreenVertical = bezelsVertical + 1;
var displayPerScreenHorizontal = bezelsHorizontal + 1;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we could rename all "display" to "monitors" (plural) here to avoid any confusion with the X11 displays?

Comment thread tide/master/resources/js/tide.js Outdated
xhr.send(null);
}

function showBezel()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

showBezels (plural), applies to multiple places

Comment thread tests/resources/configuration.xml Outdated
@@ -1,5 +1,5 @@
<configuration>
<dimensions mullionHeight="12" fullscreen="1" numTilesWidth="2" screenHeight="1080" mullionWidth="14" screenWidth="3840" numTilesHeight="3"/>
<dimensions mullionHeight="12" fullscreen="1" numTilesWidth="2" screenHeight="1080" mullionWidth="14" screenWidth="3840" numTilesHeight="3" bezelsVertical="2" bezelsHorizontal="2"/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would really stick to bezelsPerScreenX / bezelsPerScreenY otherwise it looks like the total number of bezels.

Also, it would be better if the values in this configuration were meaningful, using bezelsPerScreenX=1, bezelsPerScreenY=0, and taking this opportunity to adjust screenWidth="3854" because if should normally include the mullionWidth to be correct

Comment thread tide/core/Configuration.h Outdated
const QString& getFilename() const;

/** Get the number of vertical bezels. */
int getBezelsVertical() const;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same remark applies here and everywhere in fact, I think it should be getBezelsPerScreenX as is it not a global count of bezels

Comment thread tide/master/resources/css/styles.css Outdated
position: absolute;
width: 100%;
height: 100%;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need a formatting tool also for css and javascript... ;-)

Comment thread tests/cpp/core/ConfigurationTests.cpp Outdated
CONFIG_EXPECTED_BEZELS_VERTICAL);

BOOST_CHECK_EQUAL(config.getBezelsHorizontal(),
CONFIG_EXPECTED_BEZELS_HORIZONAL);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the #define is used only here, and the other checks in this function do not use #defines, I would just use the values here for simplicty

@ppodhajski ppodhajski force-pushed the feature/bezels branch 2 times, most recently from 05f6deb to 4354f26 Compare May 5, 2017 10:51
Comment thread tide/core/Configuration.h Outdated
/** Get the filename passed to the constructor. */
const QString& getFilename() const;

/** Get the number of horizonal bezels. */
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adjust the documentation as well

BOOST_CHECK_EQUAL(config.getFullscreen(), true);

BOOST_CHECK_EQUAL(config.getBezelsPerScreenY(), 1);
BOOST_CHECK_EQUAL(config.getBezelsPerScreenX(), 0);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x before y?

getInt(query, _bezelsPerScreenY);

query.setQuery("string(/configuration/dimensions/@bezelsPerScreenX)");
getInt(query, _bezelsPerScreenX);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x before y?

Comment thread tide/core/Configuration.cpp Outdated
return _bezelsPerScreenY;
}

int Configuration::getBezelsPerScreenX() const
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x before y?

bezelWidth=config["dimensions"]["bezelWidth"];
bezelHeight=config["dimensions"]["bezelHeight"];
bezelsPerScreenY=config["dimensions"]["bezelsPerScreenY"];
bezelsPerScreenX=config["dimensions"]["bezelsPerScreenX"];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x before y?


var totalScreens = screenCountX * screenCountY;
var monitorsPerScreenY = bezelsPerScreenY + 1;
var monitorsPerScreenX = bezelsPerScreenX + 1;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x before y?

Comment thread tide/master/rest/RestConfiguration.cpp Outdated
{"bezelHeight", _config.getMullionHeight()},
{"bezelWidth", _config.getMullionWidth()},
{"bezelsPerScreenY", _config.getBezelsPerScreenY()},
{"bezelsPerScreenX", _config.getBezelsPerScreenX()}}},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x before y?

Comment thread tide/master/resources/js/tide.js Outdated
div.append("<div class='bezel'></div>");
}
$(".bezel").css("grid-column-gap", bezelWidth).css("grid-row-gap", bezelHeight).hide();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra blank line

var div = $("<div class=bezel > </div>");
$("#wallOutline").append(div);
div.css("grid-template-columns", "repeat("+monitorsPerScreenY+", 1fr)");
div.css("grid-template-rows", "repeat("+monitorsPerScreenX+ ", 1fr)");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x before y?

@ppodhajski ppodhajski merged commit 9c9cb01 into BlueBrain:master May 5, 2017
@ppodhajski ppodhajski deleted the feature/bezels branch September 6, 2017 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants