This commit is contained in:
vany5921
2020-03-20 10:33:17 +08:00
4 changed files with 13 additions and 34 deletions
+5
View File
@@ -160,6 +160,11 @@ Resolution80 * 160
- [SPM1423](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/SPM1423HM4H-B_datasheet_en.pdf)
## structural-design-file
>[lick here for open source architecture design files](https://github.com/m5stack/m5-structural-design-file/tree/master/M5StickC)
## Version Change
<div class="table-wrapper">
-16
View File
@@ -138,11 +138,6 @@
ga: 'UA-131246469-2'
};
</script>
<!-- <script>
if (typeof navigator.serviceWorker !== 'undefined') {
navigator.serviceWorker.register('sw.js')
}
</script> -->
<script>
function product_search(onEnter_content){
$("#search_note").css("display","block");
@@ -477,9 +472,6 @@
if (document.addEventListener) {//firefox
document.addEventListener('DOMMouseScroll', scrollFunc, false);
}
//Safari与Chrome属于同一类型
// window.onmousewheel = document.onmousewheel = scrollFunc;
// window.onscroll = document.onscroll = scrollFunc;
window.onscroll = scrollFunc;
</script>
@@ -498,14 +490,9 @@ function creat_pdf() {
onrendered:function(canvas) {
var contentWidth = canvas.width;
var contentHeight = canvas.height;
//一页pdf显示html页面生成的canvas高度;
var pageHeight = contentWidth / 592.28 * 841.89;
//未生成pdf的html页面高度
var leftHeight = contentHeight;
//页面偏移
var position = 0;
//a4纸的尺寸[595.28,841.89]html页面生成的canvas在pdf中图片的宽高
var imgWidth = 595.28;
var imgHeight = 592.28/contentWidth * contentHeight;
@@ -513,8 +500,6 @@ function creat_pdf() {
var pdf = new jsPDF('', 'pt', 'a4');
//有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89)
//当内容未超过pdf一页显示的范围,无需分页
if (leftHeight < pageHeight) {
pdf.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight );
} else {
@@ -522,7 +507,6 @@ function creat_pdf() {
pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
leftHeight -= pageHeight;
position -= 841.89;
//避免添加空白页
if(leftHeight > 0) {
pdf.addPage();
}
+4 -18
View File
@@ -25,7 +25,7 @@
//加载状态为complete时隐藏loading效果
function completeLoading() {
if (document.readyState == "complete") {
var loadingMask = document.getElementById('loading');  
var loadingMask = document.getElementById('loading');
loadingMask.style.display = 'none';
// loadingMask.parentNode.removeChild(loadingMask);  
}
@@ -76,7 +76,7 @@
<a id="uiflow" class="dropdown-item" href="#/en/uiflow/uiflow_home_page">UIFlow</a>
<a id="arduino" class="dropdown-item" href="#/en/arduino/arduino_home_page">Arduino</a>
<a class="dropdown-item" href="https://github.com/m5stack/UIFlow-Code">MicroPython</a>
<a id="aws" class="dropdown-item" href="#/en/quick_start/m5stickc/m5stickc_quick_start_with_AWS-FreeRTOS_Windows">AWS-FreeRTOS</a>
<a id="aws" class="dropdown-item" href="#/en/quick_start/m5stickc/m5stickc_quick_start_with_AWS-FreeRTOS_Windows">FreeRTOS</a>
</div>
</div>
<a id="cases" class="p-2 dropdown" href="#/en/case">Cases</a>
@@ -138,11 +138,6 @@
ga: 'UA-131246469-2'
};
</script>
<!-- <script>
if (typeof navigator.serviceWorker !== 'undefined') {
navigator.serviceWorker.register('sw.js')
}
</script> -->
<script>
function product_search(onEnter_content){
$("#search_note").css("display","block");
@@ -477,9 +472,6 @@
if (document.addEventListener) {//firefox
document.addEventListener('DOMMouseScroll', scrollFunc, false);
}
//Safari与Chrome属于同一类型
// window.onmousewheel = document.onmousewheel = scrollFunc;
// window.onscroll = document.onscroll = scrollFunc;
window.onscroll = scrollFunc;
</script>
@@ -492,19 +484,15 @@ function creat_pdf() {
$('html, body').animate({scrollTop: 0}, 0);
$(".anchor-box").css("display","none");
$(".related_links").css("display","none");
$(".easyloader-box").css("display","none");
var target = document.getElementsByClassName("#main")[0];
html2canvas(target, {
onrendered:function(canvas) {
var contentWidth = canvas.width;
var contentHeight = canvas.height;
//一页pdf显示html页面生成的canvas高度;
var pageHeight = contentWidth / 592.28 * 841.89;
//未生成pdf的html页面高度
var leftHeight = contentHeight;
//页面偏移
var position = 0;
//a4纸的尺寸[595.28,841.89]html页面生成的canvas在pdf中图片的宽高
var imgWidth = 595.28;
var imgHeight = 592.28/contentWidth * contentHeight;
@@ -512,8 +500,6 @@ function creat_pdf() {
var pdf = new jsPDF('', 'pt', 'a4');
//有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89)
//当内容未超过pdf一页显示的范围,无需分页
if (leftHeight < pageHeight) {
pdf.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight );
} else {
@@ -521,7 +507,6 @@ function creat_pdf() {
pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
leftHeight -= pageHeight;
position -= 841.89;
//避免添加空白页
if(leftHeight > 0) {
pdf.addPage();
}
@@ -535,6 +520,7 @@ function creat_pdf() {
})
$(".anchor-box").removeAttr("style");
$(".related_links").removeAttr("style");
$(".easyloader-box").removeAttr("style");
}
</script>
+4
View File
@@ -158,6 +158,10 @@ M5StickC仅支持WIN10&Linux&MAC免驱,其余操作系统则需要用户自行
- [AXP192](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/AXP192_datasheet_cn.pdf)
- [SPM1423](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/SPM1423HM4H-B_datasheet_en.pdf)
## 结构设计文件
>[点击此处,获取M5StickC开源结构设计文件](https://github.com/m5stack/m5-structural-design-file/tree/master/M5StickC)
## 版本变更
<div class="table-wrapper">