Dragonboat App
How do I make an dragonboat app?
What is a dragonboat app? How do you make a dragonboat app? This script and codes were developed by Chris Wachtman on 13 January 2023, Friday.
Dragonboat App - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Dragonboat App</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.5/angular.min.js"></script>
<script src="//cdn.firebase.com/v0/firebase.js"></script>
<script src="//cdn.firebase.com/libs/angularfire/0.3.0/angularfire.min.js"></script> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="app" ng-app="myApp" ng-controller="myCtrl"> <div class="paddlerlist"> <div class="paddler" ng-repeat="paddler in paddlers" my-Dir="my-Dir" ng-click="update()"> <div class="name">{{paddler.name}}</div> <div class="weight">{{paddler.weight}}</div> <div class="gender">{{paddler.gender}}</div> <div class="side">{{paddler.side}}</div> </div> </div> <div class="boatContainer"> <div class="boat"> <div class="row" ng-repeat="row in rows"> <div class="seat" ng-repeat="seat in row.seats" seat-Dir="seat-Dir"> <div class="name">{{seat.name}}</div> </div> </div> </div> <div class="yBal"></div> <div class="xBal"></div> <div class="total"></div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Dragonboat App - Script Codes CSS Codes
.paddler, .seat{ width: 100px; height: 100px; padding: 10px; margin: 10px; border: 1px solid #000;
}
.paddlerlist{ float: left;
}
.boat{ width: 300px; float: right;
}
.row{ display: block; white-space: no-wrap; text-align: center;
}
.seat{ display: inline-table;
}
Dragonboat App - Script Codes JS Codes
var data={ paddlers:[ { name:'Erin', weight:100, gender:'F', side:'both' }, { name:'Erin', weight:100, gender:'F', side:'both' }, { name:'Erin', weight:100, gender:'F', side:'both' }, { name:'Erin', weight:100, gender:'F', side:'both' }, { name:'Erin', weight:100, gender:'F', side:'both' }, { name:'Erin', weight:100, gender:'F', side:'both' }, ], rows:[ { seats:[ {name:'Drum'} ] }, { seats:[ {name:'Front Left'}, {name:'Front Right'} ] }, { seats:[ {name:'Front Left'}, {name:'Front Right'} ] }, { seats:[ {name:'Front Left'}, {name:'Front Right'} ] }, { seats:[ {name:'Engine Left'}, {name:'Engine Right'} ] }, { seats:[ {name:'Engine Left'}, {name:'Engine Right'} ] }, { seats:[ {name:'Engine Left'}, {name:'Engine Right'} ] }, { seats:[ {name:'Engine Left'}, {name:'Engine Right'} ] }, { seats:[ {name:'Back Left'}, {name:'Back Right'} ] }, { seats:[ {name:'Back Left'}, {name:'Back Right'} ] }, { seats:[ {name:'Back Left'}, {name:'Back Right'} ] }, { seats:[ {name:'Steer'} ] } ]
}
var total=0;
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope, $http) { $scope.paddlers=data.paddlers; $scope.rows=data.rows; $scope.total=0; $scope.update = function(index) { //$scope.total++; }
});
app.directive('myDir', function() { return function(scope, element, attrs) { if (scope.$last){ } };
});
app.directive('seatDir', function() { return function(scope, element, attrs) { if (scope.$last){ $( ".seat" ).droppable({ drop: function( event, ui ) { $( "<div></div>" ).html( ui.draggable.html() ).appendTo( this ); updateBoat(); } }); $( ".paddler" ).draggable({ snap: ".seat", snapMode: "inner", helper: "clone" }); } };
});
function updateBoat(){ total=0; $('.boat .weight').each(function( index ) { total+= parseInt($( this ).text()) ; }); $('.total').html('Total: '+total);
}
Developer | Chris Wachtman |
Username | cwacht |
Uploaded | January 13, 2023 |
Rating | 3 |
Size | 2,832 Kb |
Views | 4,048 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Responsive Grid for Dynamic Layouts | 3,689 Kb |
Font Awesome Forever | 1,844 Kb |
NASA Responsive Mockup | 6,068 Kb |
What Does the Fox Say Soundboard | 2,133 Kb |
A Pen by Chris Wachtman | 5,171 Kb |
Angular-HAML | 2,022 Kb |
Icon Orb | 2,128 Kb |
Minimal Menu | 3,308 Kb |
CSS Pie Chart | 2,682 Kb |
NASA Concept | 6,304 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
See Through | Larrygeams | 77,410 Kb |
Foundation 5 Menu - Accessibility | Xporter | 1,999 Kb |
Break Out | AzazelN28 | 12,431 Kb |
A Pen by Xand0r | Xand0r | 1,928 Kb |
React Template | Isac | 1,241 Kb |
Jochaho Skeleton | Dhanushbadge | 1,689 Kb |
CSS- UI Element States Pseudo-Classes | Tesla809 | 2,206 Kb |
Mario | Takaneichinose | 3,902 Kb |
CSS3 Diamond | Rendro | 1,960 Kb |
Gears | Synvox | 3,278 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!