0
캔버스를 확대 할 수 없습니다 ???? 어떤 도움도 jquery.mousewheel.js를 사용하여 주시면 감사하겠습니다.kineticjs 4.7.4 및 jquery.mousewheel.js를 사용하여 초점 이동 및 확대/축소
kinetic를 통해 이미지를로드 할 수 있었지만 줌이 전혀 작동하지 않습니다.
가능한 경우 내 코드로 확대/축소를하고 싶습니다. 당신은 버튼 이벤트 마우스 휠 이벤트를 대체 할 수
:
예를 들어 여기에
enter code here
<!doctype html>
<html>
<head>
<script src="http://d3lp1msu2r81bx.cloudfront.net/kjs/js/lib/kinetic-v4.7.4.min.js"></script>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="https://rawgithub.com/brandonaaron/jquery-mousewheel/master/jquery.mousewheel.js"></script>
<script type="text/javascript" src="kinetics.js"></script>
<style>
canvas
{
border: 1px solid #aaa;
-moz-box-shadow: 3px 3px 8px #222;
-webkit-box-shadow: 3px 3px 8px #222;
box-shadow: 3px 3px 8px #222;
}
body {
background-image:
-moz-linear-gradient(45deg, #C0C0C0 25%, transparent 25%,transparent 75%, #C0C0C0 75%, #C0C0C0 100%),
-moz-linear-gradient(45deg, #C0C0C0 25%, transparent 25%,transparent 75%, #C0C0C0 75%, #C0C0C0 100%);
background-image:
-webkit-linear-gradient(45deg, #C0C0C0 25%, transparent 25%,transparent 75%, #C0C0C0 75%, #C0C0C0 100%),
-webkit-linear-gradient(45deg, #C0C0C0 25%, transparent 25%,transparent 75%, #C0C0C0 75%, #C0C0C0 100%);
-moz-background-size:20px 20px;
background-size:20px 20px;
-webkit-background-size:20px 20px;
background-position:0 0, 30px 30px;
padding:10px;
}
#container1, #container2 {
border:solid 1px #ccc;
margin-top: 10px;
width:300px;
height:100px;
}
#container2 {
height:300px;
width:600px;
}
</style>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<!-- <body onload="go_kinetics();"> -->
<body onload="test();">
<div id="container"></div>
<!--
<div id="container1"></div>
<div id="container2"></div>
-->
</body>
</html>
고맙습니다. @markE – user3766859