diff --git a/www/faces.php b/www/faces.php
index 085e3ba..a7257f4 100644
--- a/www/faces.php
+++ b/www/faces.php
@@ -3,6 +3,7 @@ require __DIR__ . '/../bootstrap.php';
error_reporting(E_ALL);ini_set('display_errors', true);
$em = \EmotionHero\Application::getInstance()->getEm();
+/* @var $hitRepo EmotionHero\Models\HitRepository */
$hitRepo = $em->getRepository(\EmotionHero\Models\Hit::class);
/* @var $currentHit \EmotionHero\Models\Hit */
@@ -93,6 +94,7 @@ text-align:center;
}
dd, dt{
float:left;width:80px;
+ text-align:left;
}
img.curImg{
position:absolute;
@@ -101,7 +103,7 @@ dd, dt{
}
svg{
- width:400px;
+ width:300px;
float:left;
}
@@ -119,42 +121,50 @@ echo "";
echo "";
echo "
eye brows
";
-echo "
anger
";
-$printEmoBlocks('anger','brows');
-echo "
getFeatureImgAsString("brows")}\" title=\"{$currentHit->getId()}\" style=\"top:{$currentHit->getEmotions()->getAnger()}%\">";
-echo "
";
-echo "
joy
";
-$printEmoBlocks('joy','brows');
-echo "
getFeatureImgAsString("brows")}\" title=\"{$currentHit->getId()}\" style=\"top:{$currentHit->getEmotions()->getJoy()}%\">";
-echo "
";
-echo "
sadness
";
-$printEmoBlocks('sadness','brows');
-echo "
getFeatureImgAsString("brows")}\" title=\"{$currentHit->getId()}\" style=\"top:{$currentHit->getEmotions()->getSadness()}%\">";
-echo "
";
-
-echo "
surprise
";
-$printEmoBlocks('surprise','brows');
-echo "
getFeatureImgAsString("brows")}\" title=\"{$currentHit->getId()}\" style=\"top:{$currentHit->getEmotions()->getSurprise()}%\">";
-echo "
";
-echo "
"; // .brows
+foreach(EmotionHero\Models\Emotions::$EMOTIONS as $emotion) {
+ echo "$emotion
";
+ $printEmoBlocks($emotion, 'brows');
+ echo "
getFeatureImgAsString("brows")}\" title=\"{$currentHit->getId()}\" style=\"top:{$currentHit->getEmotions()->getEmotionScore($emotion)}%\">";
+ echo "
";
+}
+//
+//echo "joy
";
+//$printEmoBlocks('joy','brows');
+//echo "
getFeatureImgAsString("brows")}\" title=\"{$currentHit->getId()}\" style=\"top:{$currentHit->getEmotions()->getJoy()}%\">";
+//echo "
";
+//
+//echo "sadness
";
+//$printEmoBlocks('sadness','brows');
+//echo "
getFeatureImgAsString("brows")}\" title=\"{$currentHit->getId()}\" style=\"top:{$currentHit->getEmotions()->getSadness()}%\">";
+//echo "
";
+//
+//echo "surprise
";
+//$printEmoBlocks('surprise','brows');
+//echo "
getFeatureImgAsString("brows")}\" title=\"{$currentHit->getId()}\" style=\"top:{$currentHit->getEmotions()->getSurprise()}%\">";
+//echo "
";
+//echo ""; // .brows
echo "nose
";
-echo "
anger";
-$printEmoBlocks('joy','nose');
-echo "
";
+foreach(EmotionHero\Models\Emotions::$EMOTIONS as $emotion) {
+ echo "
$emotion
";
+ $printEmoBlocks($emotion, 'nose');
+ echo "
getFeatureImgAsString("nose")}\" title=\"{$currentHit->getId()}\" style=\"top:{$currentHit->getEmotions()->getEmotionScore($emotion)}%\">";
+ echo "
";
+}
-echo "
joy";
-$printEmoBlocks('disgust','nose');
-echo "
";
-
-echo "
sadness";
-$printEmoBlocks('sadness','nose');
-echo "
";
echo "
"; // .nose
+foreach(EmotionHero\Models\Emotions::$EMOTIONS as $emotion) {
+ echo "$emotion
";
+ $printEmoBlocks($emotion, 'mouth_right');
+ echo "
getFeatureImgAsString("mouth_right")}\" title=\"{$currentHit->getId()}\" style=\"top:{$currentHit->getEmotions()->getEmotionScore($emotion)}%\">";
+ echo "
";
+}
+
+
$circles = "";
foreach($currentHit->getPoints()->getNormalisedPoints() as $i => $point) {
$circles .= 'getPoints()->getNormalisedPoints() as $i => $point) {
r="1" />';
}
+foreach($hitRepo->getBetterHit($currentHit)->getPoints()->getNormalisedPoints() as $i => $point) {
+ $circles .= '';
+}
+
echo <<< EOSVG