Maxim Sokhatsky 11 лет назад
Родитель
Сommit
1c4e4e287d

+ 75 - 75
apps/web/priv/static/dart/Kakaranet-Scene.svg

@@ -93,29 +93,69 @@
             </g>
             <rect id="Back-5" fill="#D6E8EA" sketch:type="MSShapeGroup" x="0" y="453" width="1070" height="206.792"></rect>
             <path d="M1071,660 L1,660 L1,600.976 L850.979,600.976 L1071,600.976 L1071,660 L1071,660 Z" id="Back-4" fill="#A8CACC" sketch:type="MSShapeGroup"></path>
-            <g id="Deck-Root" transform="translate(215.000000, 457.000000)" sketch:type="MSShapeGroup">
-                <g id="Deck">
-                    <rect id="Rectangle-path" fill="#AF7B58" x="0" y="3" width="640" height="65"></rect>
-                    <rect id="Rectangle-path" fill="#AF7B58" x="0" y="75" width="640" height="72"></rect>
-                    <path d="M640,68.0096 L279.226,68.0096 L0,68 L0,73.9916 L275.816,73.9916 L640,74 L640,68.0096 Z" id="Shape" fill="#BC8864"></path>
-                    <path d="M640,4 L0,4 L2.614,0 L637.177,0 L640,4 L640,4 Z" id="Shape" fill="#BC8864"></path>
+            <g id="Player-Center" transform="translate(444.000000, 90.000000)">
+                <g id="Name" transform="translate(42.000000, 0.000000)">
+                    <rect id="Player-Center-Pad" fill="#517ECE" sketch:type="MSShapeGroup" x="0" y="0" width="145" height="38" rx="8"></rect>
+                    <text id="Player-Center-Name" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="24" font-weight="normal" sketch:alignment="middle">
+                        <tspan x="29.732" y="26.7344">Mustafa</tspan>
+                    </text>
+                </g>
+                <g id="Timer">
+                    <path d="M5.558,38 C2.492,38 0,35.504 0,32.436 L0,5.564 C0,2.496 2.492,0 5.558,0 L32.439,0 C35.505,0 38,2.496 38,5.564 L38,32.436 C38,35.504 35.505,38 32.439,38 L5.558,38 L5.558,38 Z" id="Timer-Pad" fill="#517ECE" sketch:type="MSShapeGroup"></path>
+                    <rect id="progress" fill="#5CBF6F" sketch:type="MSShapeGroup" x="2" y="2" width="34" height="33" rx="3"></rect>
+                    <text id="value" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="20.7143027" font-weight="normal">
+                        <tspan x="9" y="27">12</tspan>
+                    </text>
+                </g>
+            </g>
+            <g id="Player-Right" transform="translate(632.000000, 150.000000)">
+                <g id="Name" transform="translate(42.000000, 0.000000)">
+                    <rect id="Player-Right-Pad" fill="#517ECE" sketch:type="MSShapeGroup" x="0" y="0" width="145" height="38" rx="8"></rect>
+                    <text id="Player-Right-Name" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="24" font-weight="normal" sketch:alignment="middle">
+                        <tspan x="43.436" y="28.7344">Alina</tspan>
+                    </text>
+                </g>
+                <g id="Timer">
+                    <path d="M5.558,38 C2.492,38 0,35.504 0,32.436 L0,5.564 C0,2.496 2.492,0 5.558,0 L32.439,0 C35.505,0 38,2.496 38,5.564 L38,32.436 C38,35.504 35.505,38 32.439,38 L5.558,38 L5.558,38 Z" id="Timer-Pad" fill="#517ECE" sketch:type="MSShapeGroup"></path>
+                    <rect id="progress" fill="#5CBF6F" sketch:type="MSShapeGroup" x="2" y="2" width="34" height="33" rx="3"></rect>
+                    <text id="value" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="20.7143027" font-weight="normal">
+                        <tspan x="9" y="27">12</tspan>
+                    </text>
+                </g>
+            </g>
+            <g id="Player-Left" transform="translate(228.000000, 150.000000)">
+                <g id="Name" transform="translate(42.000000, 0.000000)">
+                    <rect id="Player-Left-Pad" fill="#517ECE" sketch:type="MSShapeGroup" x="0" y="0" width="145" height="38" rx="8"></rect>
+                    <text id="Player-Left-Name" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="24" font-weight="normal" sketch:alignment="middle">
+                        <tspan x="24.924" y="27.1759033">Gabrielo</tspan>
+                    </text>
+                </g>
+                <g id="Timer">
+                    <path d="M5.558,38 C2.492,38 0,35.504 0,32.436 L0,5.564 C0,2.496 2.492,0 5.558,0 L32.439,0 C35.505,0 38,2.496 38,5.564 L38,32.436 C38,35.504 35.505,38 32.439,38 L5.558,38 L5.558,38 Z" id="Timer-Pad" fill="#517ECE" sketch:type="MSShapeGroup"></path>
+                    <rect id="progress" fill="#5CBF6F" sketch:type="MSShapeGroup" x="2" y="2" width="34" height="33" rx="3"></rect>
+                    <text id="value" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="20.7143027" font-weight="normal">
+                        <tspan x="9" y="27">12</tspan>
+                    </text>
                 </g>
             </g>
             <g id="Table" transform="translate(218.000000, 310.000000)" sketch:type="MSShapeGroup">
                 <path d="M634.171,146.66 L-0.36,146.66 L115.967,0.23 L524.45,0.23 L634.171,146.66 L634.171,146.66 Z" id="Shape" fill="#48AF5E"></path>
                 <path d="M475.849,63.473 C484.752,87.426 414.057,108.909 317,108.909 C219.942,108.909 149.248,87.428 158.15,63.473 C166.156,41.932 236.962,26 317,26 C397.037,26 467.843,41.932 475.849,63.473 L475.849,63.473 L475.849,63.473 Z" id="Table-Oval" fill="#5CBF6F"></path>
             </g>
-            <g id="Gabrielo-Deck" transform="translate(281.000000, 293.000000)" sketch:type="MSShapeGroup">
-                <path d="M78.207,-0.443 L72.577,-0.443 L23.768,67.33 L30.907,67.33 L78.207,-0.443 L78.207,-0.443 Z" id="Shape" fill="#BB8764"></path>
-                <path d="M30.907,121.374 L78.207,42.363 L78.207,-0.443 L30.907,67.121 L30.907,121.374 L30.907,121.374 Z" id="Shape" fill="#AF7B58"></path>
-                <path d="M17.554,81.92 L9.221,93.579 L12.589,93.579 L17.554,81.92 L17.554,81.92 Z" id="Shape" fill="#BB8764"></path>
-                <path d="M9.221,93.579 L12.589,93.579 L23.768,67.33 L30.907,67.33 L30.907,121.374 L-0.11,121.374 L9.221,93.579 L9.221,93.579 Z" id="Shape" fill="#C2906E"></path>
-            </g>
-            <g id="Alina-Deck" transform="translate(717.000000, 293.000000)" sketch:type="MSShapeGroup">
-                <path d="M-0.209,-0.443 L5.421,-0.443 L54.231,67.33 L47.091,67.33 L-0.209,-0.443 L-0.209,-0.443 Z" id="Shape" fill="#BB8764"></path>
-                <path d="M47.091,121.374 L-0.209,42.363 L-0.209,-0.443 L47.091,67.121 L47.091,121.374 L47.091,121.374 Z" id="Shape" fill="#AF7B58"></path>
-                <path d="M60.445,81.92 L68.778,93.579 L65.409,93.579 L60.445,81.92 L60.445,81.92 Z" id="Shape" fill="#BB8764"></path>
-                <path d="M68.778,93.579 L65.409,93.579 L54.231,67.33 L47.091,67.33 L47.091,121.374 L78.109,121.374 L68.778,93.579 L68.778,93.579 Z" id="Shape" fill="#C2906E"></path>
+            <g id="Player-Me" transform="translate(397.000000, 413.000000)">
+                <g id="Name" transform="translate(43.000000, 0.000000)">
+                    <rect id="Player-Me-Pad" fill="#517ECE" sketch:type="MSShapeGroup" x="0" y="0" width="89" height="39" rx="8"></rect>
+                    <text id="Player-Me-Name" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="24" font-weight="normal">
+                        <tspan x="26.9998" y="28.7344">Me</tspan>
+                    </text>
+                </g>
+                <g id="Timer">
+                    <path d="M5.558,38 C2.492,38 0,35.504 0,32.436 L0,5.564 C0,2.496 2.492,0 5.558,0 L32.439,0 C35.505,0 38,2.496 38,5.564 L38,32.436 C38,35.504 35.505,38 32.439,38 L5.558,38 L5.558,38 Z" id="Timer-Pad" fill="#517ECE" sketch:type="MSShapeGroup"></path>
+                    <rect id="progress" fill="#5CBF6F" sketch:type="MSShapeGroup" x="2" y="2" width="34" height="33" rx="3"></rect>
+                    <text id="value" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="20.7143027" font-weight="normal">
+                        <tspan x="9" y="27">12</tspan>
+                    </text>
+                </g>
             </g>
             <g id="Mustafa-Deck" transform="translate(420.000000, 269.000000)" sketch:type="MSShapeGroup">
                 <path d="M234.674,19.765 L1.715,19.765 L0.218,23.232 L236.245,23.232 L234.674,19.765 L234.674,19.765 Z" id="Shape" fill="#AA6F48"></path>
@@ -291,65 +331,17 @@
                     <path d="M15.974,14.579 C16,15.145 15.41,15.606 14.655,15.606 L1.011,15.606 C0.256,15.606 -0.335,15.145 -0.31,14.579 L0.324,0.514 C0.345,0.037 0.92,-0.347 1.607,-0.347 L14.034,-0.347 C14.722,-0.347 15.297,0.037 15.319,0.514 L15.974,14.579 L15.974,14.579 Z" id="Shape" fill="#FFFFFF"></path>
                 </g>
             </g>
-            <g id="Player-Center" transform="translate(444.000000, 90.000000)">
-                <g id="Name" transform="translate(42.000000, 0.000000)">
-                    <rect id="Player-Center-Pad" fill="#517ECE" sketch:type="MSShapeGroup" x="0" y="0" width="145" height="38" rx="8"></rect>
-                    <text id="Player-Center-Name" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="24" font-weight="normal" sketch:alignment="middle">
-                        <tspan x="29.732" y="26.7344">Mustafa</tspan>
-                    </text>
-                </g>
-                <g id="Timer">
-                    <path d="M5.558,38 C2.492,38 0,35.504 0,32.436 L0,5.564 C0,2.496 2.492,0 5.558,0 L32.439,0 C35.505,0 38,2.496 38,5.564 L38,32.436 C38,35.504 35.505,38 32.439,38 L5.558,38 L5.558,38 Z" id="Timer-Pad" fill="#517ECE" sketch:type="MSShapeGroup"></path>
-                    <rect id="progress" fill="#5CBF6F" sketch:type="MSShapeGroup" x="2" y="2" width="34" height="33" rx="3"></rect>
-                    <text id="value" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="20.7143027" font-weight="normal">
-                        <tspan x="9" y="27">12</tspan>
-                    </text>
-                </g>
-            </g>
-            <g id="Player-Right" transform="translate(632.000000, 150.000000)">
-                <g id="Name" transform="translate(42.000000, 0.000000)">
-                    <rect id="Player-Right-Pad" fill="#517ECE" sketch:type="MSShapeGroup" x="0" y="0" width="145" height="38" rx="8"></rect>
-                    <text id="Player-Right-Name" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="24" font-weight="normal" sketch:alignment="middle">
-                        <tspan x="43.436" y="28.7344">Alina</tspan>
-                    </text>
-                </g>
-                <g id="Timer">
-                    <path d="M5.558,38 C2.492,38 0,35.504 0,32.436 L0,5.564 C0,2.496 2.492,0 5.558,0 L32.439,0 C35.505,0 38,2.496 38,5.564 L38,32.436 C38,35.504 35.505,38 32.439,38 L5.558,38 L5.558,38 Z" id="Timer-Pad" fill="#517ECE" sketch:type="MSShapeGroup"></path>
-                    <rect id="progress" fill="#5CBF6F" sketch:type="MSShapeGroup" x="2" y="2" width="34" height="33" rx="3"></rect>
-                    <text id="value" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="20.7143027" font-weight="normal">
-                        <tspan x="9" y="27">12</tspan>
-                    </text>
-                </g>
-            </g>
-            <g id="Player-Left" transform="translate(228.000000, 150.000000)">
-                <g id="Name" transform="translate(42.000000, 0.000000)">
-                    <rect id="Player-Left-Pad" fill="#517ECE" sketch:type="MSShapeGroup" x="0" y="0" width="145" height="38" rx="8"></rect>
-                    <text id="Player-Left-Name" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="24" font-weight="normal" sketch:alignment="middle">
-                        <tspan x="24.924" y="27.1759033">Gabrielo</tspan>
-                    </text>
-                </g>
-                <g id="Timer">
-                    <path d="M5.558,38 C2.492,38 0,35.504 0,32.436 L0,5.564 C0,2.496 2.492,0 5.558,0 L32.439,0 C35.505,0 38,2.496 38,5.564 L38,32.436 C38,35.504 35.505,38 32.439,38 L5.558,38 L5.558,38 Z" id="Timer-Pad" fill="#517ECE" sketch:type="MSShapeGroup"></path>
-                    <rect id="progress" fill="#5CBF6F" sketch:type="MSShapeGroup" x="2" y="2" width="34" height="33" rx="3"></rect>
-                    <text id="value" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="20.7143027" font-weight="normal">
-                        <tspan x="9" y="27">12</tspan>
-                    </text>
-                </g>
+            <g id="Gabrielo-Deck" transform="translate(281.000000, 293.000000)" sketch:type="MSShapeGroup">
+                <path d="M78.207,-0.443 L72.577,-0.443 L23.768,67.33 L30.907,67.33 L78.207,-0.443 L78.207,-0.443 Z" id="Shape" fill="#BB8764"></path>
+                <path d="M30.907,121.374 L78.207,42.363 L78.207,-0.443 L30.907,67.121 L30.907,121.374 L30.907,121.374 Z" id="Shape" fill="#AF7B58"></path>
+                <path d="M17.554,81.92 L9.221,93.579 L12.589,93.579 L17.554,81.92 L17.554,81.92 Z" id="Shape" fill="#BB8764"></path>
+                <path d="M9.221,93.579 L12.589,93.579 L23.768,67.33 L30.907,67.33 L30.907,121.374 L-0.11,121.374 L9.221,93.579 L9.221,93.579 Z" id="Shape" fill="#C2906E"></path>
             </g>
-            <g id="Player-Me" transform="translate(397.000000, 413.000000)">
-                <g id="Name" transform="translate(43.000000, 0.000000)">
-                    <rect id="Player-Me-Pad" fill="#517ECE" sketch:type="MSShapeGroup" x="0" y="0" width="89" height="39" rx="8"></rect>
-                    <text id="Player-Me-Name" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="24" font-weight="normal">
-                        <tspan x="26.9998" y="28.7344">Me</tspan>
-                    </text>
-                </g>
-                <g id="Timer">
-                    <path d="M5.558,38 C2.492,38 0,35.504 0,32.436 L0,5.564 C0,2.496 2.492,0 5.558,0 L32.439,0 C35.505,0 38,2.496 38,5.564 L38,32.436 C38,35.504 35.505,38 32.439,38 L5.558,38 L5.558,38 Z" id="Timer-Pad" fill="#517ECE" sketch:type="MSShapeGroup"></path>
-                    <rect id="progress" fill="#5CBF6F" sketch:type="MSShapeGroup" x="2" y="2" width="34" height="33" rx="3"></rect>
-                    <text id="value" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="20.7143027" font-weight="normal">
-                        <tspan x="9" y="27">12</tspan>
-                    </text>
-                </g>
+            <g id="Alina-Deck" transform="translate(717.000000, 293.000000)" sketch:type="MSShapeGroup">
+                <path d="M-0.209,-0.443 L5.421,-0.443 L54.231,67.33 L47.091,67.33 L-0.209,-0.443 L-0.209,-0.443 Z" id="Shape" fill="#BB8764"></path>
+                <path d="M47.091,121.374 L-0.209,42.363 L-0.209,-0.443 L47.091,67.121 L47.091,121.374 L47.091,121.374 Z" id="Shape" fill="#AF7B58"></path>
+                <path d="M60.445,81.92 L68.778,93.579 L65.409,93.579 L60.445,81.92 L60.445,81.92 Z" id="Shape" fill="#BB8764"></path>
+                <path d="M68.778,93.579 L65.409,93.579 L54.231,67.33 L47.091,67.33 L47.091,121.374 L78.109,121.374 L68.778,93.579 L68.778,93.579 Z" id="Shape" fill="#C2906E"></path>
             </g>
             <g id="Gabrielo-Discard" transform="translate(232.000000, 391.000000)" fill="#B5C6D8" sketch:type="MSShapeGroup">
                 <rect id="Shape" x="0" y="-0.0465116279" width="40" height="59.8006645" rx="8"></rect>
@@ -427,6 +419,14 @@
                 <path d="M114,-0.235 L114,114 L-0.238,114 C-0.01,51.009 51.008,-0.008 114,-0.235" id="Shape_251_" fill="#48AF5E"></path>
                 <path d="M81.215,48.569 L59.96,48.569 C57.488,48.569 55.485,50.572 55.485,53.043 L55.485,85.483 C55.485,87.954 57.488,89.957 59.96,89.957 L81.215,89.957 C83.686,89.957 85.689,87.954 85.689,85.483 L85.689,53.043 C85.688,50.572 83.686,48.569 81.215,48.569 L81.215,48.569 L81.215,48.569 Z M70.588,75.609 C67.08,75.609 64.241,72.766 64.241,69.262 C64.241,65.755 67.08,62.915 70.588,62.915 C74.092,62.915 76.935,65.755 76.935,69.262 C76.935,72.768 74.092,75.609 70.588,75.609 L70.588,75.609 L70.588,75.609 Z" id="Shape_252_" fill="#FFFFFF"></path>
             </g>
+            <g id="Deck-Root" transform="translate(215.000000, 457.000000)" sketch:type="MSShapeGroup">
+                <g id="Deck">
+                    <rect id="Rectangle-path" fill="#AF7B58" x="0" y="3" width="640" height="65"></rect>
+                    <rect id="Rectangle-path" fill="#AF7B58" x="0" y="75" width="640" height="72"></rect>
+                    <path d="M640,68.0096 L279.226,68.0096 L0,68 L0,73.9916 L275.816,73.9916 L640,74 L640,68.0096 Z" id="Shape" fill="#BC8864"></path>
+                    <path d="M640,4 L0,4 L2.614,0 L637.177,0 L640,4 L640,4 Z" id="Shape" fill="#BC8864"></path>
+                </g>
+            </g>
             <text id="Quota" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="20" font-weight="bold">
                 <tspan x="135.5" y="637.318984">Quota: 722 </tspan>
             </text>

+ 1 - 1
apps/web/priv/static/dart/index.htm

@@ -23,8 +23,8 @@
     <script src="js/okey/hand.js"></script>
     <script src="js/okey/card.js"></script>
     <script src="js/okey/deck.js"></script>
+    <script src="js/okey/app.js"></script>
 
-    <script src="js/app.js"></script>
     <script src="js/chat.js"></script>
     <script src="js/bootloader.js"></script>
 

+ 5 - 3
apps/web/priv/static/dart/js/bootloader.js

@@ -100,8 +100,10 @@ function PatchSVG()
     document.getElementById("Clip-Path-Left-Chat").setAttribute("transform", "translate(0,0)");
 
 //  document.getElementById('Player-Statistics').style.display = 'none';
-    document.getElementById("Right-Bar").setAttribute("fill","skyblue");
+    document.getElementById("Right-Bar").setAttribute("fill","lightblue");
+    document.getElementById("Left-Bar").setAttribute("fill","lightblue");
     document.getElementById("Right-Bar").setAttribute("xmlns:data","Right-Bar");
+    document.getElementById("Left-Bar").setAttribute("xmlns:data","Left-Bar");
 
     document.getElementById("Right-Bar").onmouseover = barHover;
     document.getElementById("Right-Bar").onmouseout = barHoverOut;
@@ -139,11 +141,11 @@ function PatchSVG()
     initDiscards();
 
     Core(ControllerScope);
+    Core(DragScope);
+    Core(DropScope);
     Core(TimerScope);
     Core(PlayerScope);
     Core(OkeyApiProviderScope);
-    Core(DragScope);
-    Core(DropScope);
     Core(CardScope);
     Core(HandScope);
     Core(DeckScope);

+ 1 - 1
apps/web/priv/static/dart/js/okey/apiprovider.js

@@ -88,7 +88,7 @@ function OkeyApiProviderScope(scope) {
             return msg;
         },
         emitEvent: function(msg) {
-            console.log(JSON.stringify(msg));
+//            console.log(JSON.stringify(msg));
             for (var event, i = eventMap.length; i--; ) event = eventMap[i], msg[event] && this.$socket.trigger(event, {
                 detail: msg[event]
             });

+ 7 - 21
apps/web/priv/static/dart/js/app.js → apps/web/priv/static/dart/js/okey/app.js

@@ -7,7 +7,6 @@ function PostLoad()
     leftFlag = 1;
 
     window.deck = scope.deck;
-    deck = window.deck;
     scope.user = document.user;
 
     var centralCard,
@@ -20,26 +19,23 @@ function PostLoad()
 
     function createCentralCard() {
         centralCard = new scope.Card(),
-        centralCard.$el.attr({opacity: 0, transform: "translate(298,-115)" })
+        centralCard.$el.attr({opacity: 0, transform: "translate(298, -115)" })
         .on(document.createTouch ? "touchstart" : "mousedown", fadeIn)
         .on(document.createTouch ? "touchend"   : "mouseup",   fadeOut);
 
-        centralCard.drag();
-        centralCard.dragHandler.enable();
         centralCard.on("dragstart", deck.select).on("dragmove", removeFadeOut)
                                             .on("dragstop", addFadeOut)
                                             .on("dragmove", deck.track)
                                             .on("revert",   fadeOut);
 
-        console.log(scope.deck.$el[0]);
-        console.log(centralCard.$el[0]);
         deck.$el.append(centralCard.$el[0]);
+        centralCard.drag();
+        centralCard.dragHandler.enable();
     }
 
     createCentralCard(),
 
     deck.on("take", function(e) {
-        console.log("Take");
         e.detail.card.$el.off(document.createTouch ? "touchstart" : "mousedown", fadeIn)
                          .off(document.createTouch ? "touchend"   : "mouseup",   fadeOut),
         centralCard.off("dragmove", removeFadeOut).off("dragstop", addFadeOut).off("revert", fadeOut),
@@ -50,10 +46,8 @@ function PostLoad()
     var $gosterme = $("#Gosterme"),
         ended = !0;
 
-    function init(e) { initOkeyScene(e,$gosterme,centralCard); }
-
-    apiProvider.on("okey_game_started", init);
-    apiProvider.on("okey_game_player_state", init);
+    apiProvider.on("okey_game_started", initOkeyScene);
+    apiProvider.on("okey_game_player_state", initOkeyScene);
 
     var playersPositions = 
         [
@@ -68,8 +62,6 @@ function PostLoad()
         playersLeftHandsMap = {};
 
     apiProvider.on("okey_game_info", function(e) {
-        console.log(JSON.stringify(e));
-        console.log("Scope.User");
         scope.user = document.user;
         if (!scope.started) {
             for (var playerInfo, players = e.detail.players, i = 0; i < players.length; i++) 
@@ -79,8 +71,6 @@ function PostLoad()
                 break;
             }
             for (var playerInfo, i = 0, l = players.length; l > i; i++) {
-                console.log(i);
-                console.log(playersPositions[i]);
                 playerInfo = players[i].PlayerInfo, playersMap[playerInfo[0]] = playersMap[playerInfo[0]] || new scope.Player({
                     position: playersPositions[i],
                     name: [ playerInfo[2], playerInfo[3] ].join(" ")
@@ -109,7 +99,7 @@ function PostLoad()
     var playerTurn = !1;
 
     apiProvider.on("online_number", function (e) {
-        console.log("Online Number");
+//        console.log("Online Number");
     });
 
     apiProvider.on("okey_next_turn", function(e) {
@@ -161,10 +151,6 @@ function PostLoad()
             c.log();
         }
 
-        console.log(e.detail.revealed);
-        console.log(scope.user);
-
-
         if (e.detail.pile && !deck.justTaken && playersLeftHandsMap[e.detail.player].take(), 
             0 === e.detail.pile && e.detail.player == scope.user && (centralCard.color = scope.CARD_COLORS[e.detail.revealed[1] - 1], 
             centralCard.value = e.detail.revealed[2], centralCard.render(), createCentralCard()), 
@@ -238,7 +224,7 @@ function PostLoad()
         }
     });
 
-function initOkeyScene(e,$gosterme,centralCard)
+function initOkeyScene(e)
 {
     if (ended = !1, 
         scope.deck.fill(e.detail.tiles),

+ 1 - 0
apps/web/priv/static/dart/js/okey/deck.js

@@ -34,6 +34,7 @@ function DeckScope(scope) {
                         color: scope.CARD_COLORS[tile[1] - 1],
                         value: tile[2]
                     });
+                    card.drag();
                     card.pos = {
                         x: i,
                         y: j

+ 12 - 19
apps/web/priv/static/dart/js/okey/dragndrop.js

@@ -100,35 +100,28 @@ function DropScope(scope) {
 
     function Droppable(root, options)
     {
-        options = options || {}, this.$el = $(root), this.accept = options.accept || function() {
-            return !0;
-        }, this.onDrop = options.drop || function() {}, this.elements = {}, this.proxies = [], 
-        this.__super__.constructor.call(this); this.activate();
+        options = options || {},
+        this.$el = $(root),
+        this.accept = options.accept || function() { return !0; },
+        this.onDrop = options.drop || function() {};
+        this.elements = {};
+        this.proxies = [];
+        this.__super__.constructor.call(this);
+        this.activate();
     }
 
     Droppable.list = [];
 
     $.inherit(Droppable, scope.Controller), $.extend(Droppable.prototype, {
-        drop: function(target, x, y) {
-            return this.accept(target, x, y) ? (this.onDrop(target, x, y), !0) : !1;
-        },
-        activate: function() {
-            Droppable.list.push(this);
-        },
-        release: function() {
-            var i;
-            ~(i = Droppable.list.indexOf(this)) && Droppable.list.splice(i, 1);
-        }
+        drop: function(target, x, y) { return this.accept(target, x, y) ? (this.onDrop(target, x, y), !0) : !1; },
+        activate: function() { Droppable.list.push(this); },
+        release: function() { var i; ~(i = Droppable.list.indexOf(this)) && Droppable.list.splice(i, 1); }
     });
 
     scope.Droppable = Droppable, 
 
     $.mixin({
-        droppable: function(options) {
-            return this.each(function(el) {
-                new Droppable(el, options);
-            });
-        }
+        droppable: function(options) { return this.each(function(el) { new Droppable(el, options); }); }
     });
 
 }

+ 0 - 5
apps/web/priv/static/dart/js/player.js

@@ -7,7 +7,6 @@ function PlayerScope(scope) {
         this.position = options.position, 
         this.noSkin = options.noSkin,
         this.skin = options.skin || scope.SKIN_NAMES[$.rand(0, scope.SKIN_NAMES.length - 1)], 
-        console.log(this.position);
         this.$el = $("#Player-" + this.position),
         this.$page = $("#Kakaranet-12-maxim"),
         this.elements = {
@@ -33,10 +32,6 @@ function PlayerScope(scope) {
 
         loadSkin: function(result) {
 
-            var html = svg(result.toString());
-            console.log(result.toString());
-            console.log(html);
-
             var $result = $("<g/>").html(result);
             var element = $result[0].firstChild;
             var xform = parseTransformAttribute(element.getAttribute("transform"));

+ 1 - 1
apps/web/priv/static/dart/svg/person-right-alina.svg

@@ -1,4 +1,4 @@
-<g xmlns="http://www.w3.org/2000/svg" id="Person-Right-Alina" transform="translate(760.000000,214)" sketch:type="MSShapeGroup">
+<g xmlns="http://www.w3.org/2000/svg" id="Person-Right-Alina" transform="translate(750.000000,214)" sketch:type="MSShapeGroup">
     <path id="Selection" d="M102.881,162.547 C100.541,145.769 99.397,134.956 98.477,126.268 C97.661,118.557 97.014,112.466 95.87,105.132 C94.932,99.128 91.02,93.511 85.009,86.42 C84.974,86.374 84.937,86.33 84.9,86.285 L84.295,85.564 C94.332,69.79 92.707,53.121 89.166,41.246 C91.025,29.142 88.184,21.31 85.416,16.828 C81.395,10.322 74.787,6.438 67.738,6.438 C67.658,6.438 67.578,6.439 67.496,6.44 C62.654,2.126 56.041,-0.222 48.59,-0.222 C39.182,-0.222 30.371,3.445 26.145,9.119 C23.659,12.454 22.124,15.93 21.565,19.477 C18.151,23.168 15.432,29.957 19.12,37.748 C19.13,37.769 19.14,37.788 19.149,37.808 C20.389,40.342 22.251,42.886 24.096,44.681 C24.096,44.685 24.098,44.688 24.098,44.692 L24.106,44.902 C24.114,45.06 24.12,45.218 24.131,45.377 C24.463,50.7 25.213,55.797 26.36,60.519 C26.391,60.648 26.428,60.792 26.467,60.936 L26.506,61.081 C27.412,64.685 28.531,67.975 29.852,70.908 C28.678,71.854 27.637,72.929 26.715,74.144 C21.067,81.583 14.348,92.177 7.235,103.394 C4.898,107.077 2.492,110.865 0.051,114.664 L70.189,209.161 C70.211,209.143 70.237,209.129 70.258,209.109 C75.219,204.606 79.779,200.129 90.133,189.773 C99.223,180.681 103.989,170.503 102.881,162.547 L102.881,162.547 L102.881,162.547 Z" fill="#557EBE"></path>
     <path d="M74.166,82.202 C74.156,82.136 73.764,82.247 73.756,82.179 C71.283,82.115 68.731,81.458 66.688,80.343 C61.344,77.421 57.936,73.167 56.559,67.7 C56.516,67.524 56.485,67.348 56.446,67.171 C53.594,68.956 48.962,71.519 44.979,73.247 C45.043,74.651 45.106,75.786 45.221,76.688 C43.903,77.766 43.735,77.969 40.68,80.153 C40.68,80.153 24.93,92.403 33.43,102.153 C41.93,111.903 66.555,96.778 73.555,90.278 C76.93,88.403 81.071,89.501 81.071,89.501 L78.012,85.86 L74.166,82.202 L74.166,82.202 Z" id="Alina-Neck" fill="#FFD191"></path>
     <path d="M56.769,55.492 C56.78,55.452 56.79,55.416 56.8,55.376 C56.868,55.118 56.938,54.864 57.009,54.624 C57.043,54.511 57.077,54.408 57.111,54.299 C57.161,54.14 57.211,53.978 57.26,53.827 C57.329,53.622 57.399,53.431 57.468,53.244 C57.484,53.202 57.499,53.153 57.516,53.111 C57.779,52.416 58.036,51.861 58.252,51.483 C59.966,42.252 58.606,36.419 56.564,32.788 C56.093,31.95 55.585,31.23 55.072,30.612 C51.201,31.864 47.152,32.538 43.342,32.538 C35.805,32.944 30.074,30.716 29.582,30.282 C29.543,30.486 29.509,30.678 29.474,30.871 C29.235,32.617 28.883,37.704 28.991,42.235 C28.989,42.234 28.987,42.232 28.985,42.231 C29.398,54.864 32.308,67.305 37.846,74.903 C40.108,76.284 51.245,70.425 56.445,67.174 C55.473,62.825 55.973,58.563 56.769,55.492 L56.769,55.492 L56.769,55.492 Z" id="Alina-Face" fill="#FFE0A5"></path>

+ 1 - 1
apps/web/priv/static/dart/svg/person-right-gabrielo.svg

@@ -1,4 +1,4 @@
-<g xmlns="http://www.w3.org/2000/svg" id="Person-Right-Gabrielo" transform="translate(760,214)" sketch:type="MSShapeGroup">
+<g xmlns="http://www.w3.org/2000/svg" id="Person-Right-Gabrielo" transform="translate(750,214)" sketch:type="MSShapeGroup">
     <path id="Selection" d="M110.954,183.006 C106.497,151.041 103.022,128.803 100.724,114.086 C99.355,105.339 87.419,90.313 82.581,84.519 C81.977,81.647 80.804,77.727 78.595,74.871 C78.243,68.784 78.404,62.681 78.615,58.468 C78.988,52.784 80.234,47.327 81.441,42.049 C83.818,31.651 86.066,21.812 79.496,14.915 C79.215,14.548 78.873,14.214 78.476,13.926 C78.466,13.917 78.456,13.909 78.447,13.902 C78.424,13.882 78.4,13.861 78.379,13.839 C78.393,12.171 77.57,10.582 76.152,9.638 C75.382,9.124 74.506,8.847 73.619,8.804 C67.648,1.738 57.353,1.344 48.826,1.019 C45.096,0.876 41.57,0.742 38.428,0.18 C38.135,0.127 37.84,0.102 37.547,0.102 C36.156,0.102 34.813,0.683 33.858,1.728 C33.067,2.593 32.616,3.695 32.555,4.833 C27.742,6.542 23.961,9.259 21.637,12.745 C20.162,14.958 20.678,17.938 22.809,19.527 C24.502,20.788 24.639,21.035 23.977,25.587 C23.409,29.483 22.637,34.783 24.52,41.927 L24.543,42.306 C24.568,42.751 24.652,43.186 24.791,43.601 C24.795,44.081 24.799,44.595 24.803,45.138 C24.803,45.172 24.805,45.205 24.805,45.239 C24.832,48.607 24.862,53.104 24.879,58.393 C24.883,59.622 24.887,60.896 24.889,62.206 L24.889,62.307 C24.893,63.89 24.895,65.523 24.895,67.21 C24.856,68.968 25.356,70.712 26.041,72.259 C21.996,75.036 17.768,78.938 14.68,84.889 C12.311,89.449 10.578,93.523 8.383,98.68 C6.341,103.479 3.842,109.346 0.081,117.274 L78.465,222.881 C78.533,222.836 78.603,222.793 78.666,222.74 C85,217.375 90.416,212.996 103.145,202.732 C108.999,198.01 111.993,190.451 110.954,183.006 L110.954,183.006 L110.954,183.006 Z" fill="#557EBE"></path>
     <path d="M46.966,86.163 L43.366,92.384 C42.995,93.113 42.255,93.536 41.491,93.544 C41.155,93.55 40.813,93.474 40.495,93.312 C39.446,92.775 39.032,91.488 39.567,90.441 L43.743,82.271 C44.165,81.447 45.22,79.539 46.169,79.369 C46.464,81.938 46.966,86.163 46.966,86.163 L46.966,86.163 L46.966,86.163 Z M73.695,76.929 C73.824,77.994 73.775,78.217 73.912,79.616 C64.961,85.112 51.631,87.04 51.5,87.059 C50.676,87.174 49.994,87.762 49.752,88.557 L46.363,99.844 C46.17,100.492 46.293,101.192 46.695,101.731 C47.099,102.274 47.734,102.594 48.408,102.592 C48.418,102.59 48.508,102.592 48.513,102.59 C50.706,102.567 70.146,102.033 77.89,90.953 C78.011,90.783 78.105,90.59 78.169,90.387 C78.556,89.192 77.224,79.85 73.695,76.929 L73.695,76.929 L73.695,76.929 Z" id="Gabrielo-Colar" fill="#EFEFEF"></path>
     <path d="M69.999,50.78 L69.923,43.846 C69.903,42.276 68.616,41.013 67.044,41.033 C65.476,41.052 64.214,42.339 64.233,43.911 L64.212,48.491 C63.407,48.66 62.692,48.61 62.118,48.428 C58.403,48.311 59.77,36.483 58.827,33.657 C57.821,30.649 51.194,27.76 46.005,29.018 C37.755,31.018 35.066,28.78 32.63,27.518 C32.132,27.321 31.72,27.309 31.376,27.44 L31.376,27.444 C30.942,28.594 30.599,29.832 30.343,31.149 L30.343,31.153 C30.216,31.809 30.109,32.486 30.023,33.181 C30.023,33.186 30.023,33.19 30.021,33.194 C29.937,33.891 29.871,34.608 29.826,35.341 C29.889,37.715 30.035,40.17 29.967,42.017 C29.961,42.175 29.873,42.189 29.778,42.159 C29.825,46.938 29.895,56.04 29.895,67.275 C29.77,71.025 35.352,78.266 39.77,78.399 C45.827,78.485 56.381,71.456 61.756,68.268 C64.715,66.512 65.227,65.709 65.49,61.589 C65.523,61.055 65.553,58.467 65.584,57.813 C65.789,54.098 67.787,52.533 69.777,51.895 C69.921,51.551 70.003,51.176 69.999,50.78 L69.999,50.78 L69.999,50.78 Z" id="Gabrielo-Body_2_" fill="#FFE0A5"></path>

+ 1 - 1
apps/web/priv/static/dart/svg/person-right-mustafa.svg

@@ -1,4 +1,4 @@
-<g xmlns="http://www.w3.org/2000/svg" id="Person-Right-Mustafa" transform="translate(760.000000,211.000000)" sketch:type="MSShapeGroup">
+<g xmlns="http://www.w3.org/2000/svg" id="Person-Right-Mustafa" transform="translate(750.000000,211.000000)" sketch:type="MSShapeGroup">
     <path id="Selection" d="M110.987,188.456 C106.528,156.475 103.053,134.245 100.755,119.534 C99.388,110.79 87.452,95.763 82.614,89.969 C82.02,87.14 80.868,83.28 78.712,80.433 C78.476,74.919 78.741,69.572 79.06,65.65 C84.65,55.781 88.304,39.465 84.316,27.427 C82.257,21.214 78.312,16.54 72.845,13.806 C67.802,5.035 58.282,-0.337 47.554,-0.337 C40.71,-0.337 33.921,1.798 27.911,5.838 C24.927,7.681 24.429,10.434 24.97,12.419 C25.068,12.774 25.199,13.112 25.357,13.431 C20.046,17.933 13.039,29.279 24.869,54.97 C24.889,57.909 24.902,60.879 24.912,63.845 C24.916,65.073 24.92,66.347 24.922,67.656 L24.922,67.755 C24.926,69.337 24.928,70.974 24.928,72.66 C24.889,74.418 25.389,76.161 26.074,77.709 C22.029,80.484 17.803,84.385 14.713,90.338 C12.346,94.898 10.611,98.971 8.418,104.126 C6.401,108.861 3.736,114.872 0.051,122.651 L78.491,228.336 C78.561,228.289 78.634,228.245 78.699,228.19 C85.054,222.806 90.467,218.432 103.178,208.183 C109.031,203.46 112.026,195.901 110.987,188.456 L110.987,188.456 L110.987,188.456 Z" fill="#557EBE"></path>
     <path d="M69.231,17.657 C62.637,4.136 44.817,0.429 30.608,10.05 C28.983,11.009 30.094,11.829 31.024,11.3 C32.219,10.37 34.583,13.548 30.637,15.845 C26.004,18.298 17.43,27.552 29.86,53.841 L29.86,53.843 C29.85,52.37 29.84,51.041 29.829,49.864 C29.858,49.434 29.89,48.974 29.934,48.455 C30.071,47.086 29.934,45.028 29.784,42.851 C29.831,39.04 30.352,35.655 31.44,32.807 C31.891,32.852 32.434,33.088 33.102,33.578 C35.163,35.091 39.413,36.466 46.038,34.216 C51.095,32.498 58.038,32.091 58.86,39.106 C59.215,42.135 58.368,54.333 62.421,53.872 L62.421,53.856 C62.976,54.006 63.634,54.098 64.319,54.161 L64.266,49.359 C64.246,47.787 65.508,46.501 67.077,46.481 C68.649,46.461 69.936,47.724 69.956,49.295 L70.032,56.229 C70.038,56.737 69.899,57.208 69.671,57.623 C70.319,60.82 71.069,65.085 73.732,64.81 C80.963,53.732 87.346,24.962 69.231,17.657 L69.231,17.657 L69.231,17.657 Z" id="Mustafa-Hair_1_" fill="#3F372E"></path>
     <path d="M70.076,59.583 C69.928,58.917 69.797,58.249 69.67,57.623 C69.899,57.208 70.037,56.737 70.031,56.229 L69.955,49.295 C69.935,47.724 68.648,46.461 67.076,46.481 C65.508,46.501 64.246,47.787 64.265,49.359 L64.318,54.161 C63.632,54.098 62.974,54.007 62.42,53.856 L62.42,53.872 C58.367,54.333 59.215,42.136 58.859,39.106 C58.037,32.091 51.093,32.499 46.037,34.216 C39.412,36.466 35.162,35.091 33.101,33.578 C32.433,33.088 31.89,32.851 31.439,32.807 C30.351,35.655 29.83,39.04 29.783,42.851 C29.933,45.028 30.07,47.085 29.933,48.455 C29.888,48.972 29.857,49.429 29.829,49.856 C29.872,54.97 29.925,63.056 29.925,72.723 C29.8,76.473 35.382,83.715 39.8,83.848 C45.857,83.934 60.169,75.993 62.993,73.737 C66.03,71.311 66.032,70.684 65.614,65.262 C65.133,61.594 67.59,60.137 70.076,59.583 L70.076,59.583 L70.076,59.583 Z" id="Mustafa-Face_1_" fill="#FFE0A5"></path>

BIN
apps/web/priv/static/doc/Kakaranet-Scene.sketch/Data