Fix lgtm issues.

This commit is contained in:
Viktor Kovacs 2021-03-28 09:59:51 +02:00
parent 55e52b4e79
commit a1210d2129
6 changed files with 12 additions and 12 deletions

View File

@ -336,7 +336,7 @@ OV.Importer3ds = class extends OV.ImporterBase
let v0 = reader.ReadUnsignedInteger16 ();
let v1 = reader.ReadUnsignedInteger16 ();
let v2 = reader.ReadUnsignedInteger16 ();
let flags = reader.ReadUnsignedInteger16 ();
reader.ReadUnsignedInteger16 (); // flags
mesh.AddTriangle (new OV.Triangle (v0, v1, v2));
}

View File

@ -741,9 +741,6 @@ OV.ImporterGltf = class extends OV.ImporterBase
let hasNormals = (primitive.attributes.NORMAL !== undefined);
let hasUVs = (primitive.attributes.TEXCOORD_0 !== undefined);
let hasIndices = (primitive.indices !== undefined);
if (!hasVertices) {
return;
}
let mode = OV.GltfRenderMode.TRIANGLES;
if (primitive.mode !== undefined) {
@ -766,6 +763,8 @@ OV.ImporterGltf = class extends OV.ImporterBase
reader.EnumerateData (function (data) {
mesh.AddVertex (data);
});
} else {
return;
}
if (hasNormals) {

View File

@ -11,7 +11,7 @@
<script type='text/javascript'>
function Sandbox3D ()
{
let canvas = document.getElementById ('canvas')
let canvas = document.getElementById ('canvas');
let parameters = {
canvas : canvas,

View File

@ -54,7 +54,7 @@ OV.ButtonDialog = class
let contentDiv = this.modal.GetContentDiv ();
contentDiv.addClass ('ov_dialog');
let titleDiv = $('<div>').addClass ('ov_dialog_title').html (title).appendTo (contentDiv);
$('<div>').addClass ('ov_dialog_title').html (title).appendTo (contentDiv);
let dialogContentDiv = $('<div>').addClass ('ov_dialog_content').appendTo (contentDiv);
let buttonsDiv = $('<div>').addClass ('ov_dialog_buttons').appendTo (contentDiv);
let buttonsInnerDiv = $('<div>').addClass ('ov_dialog_buttons_inner').appendTo (buttonsDiv);
@ -152,14 +152,14 @@ OV.ShowOpenUrlDialog = function (onOk)
{
for (let i = 0; i < urls.length; i++) {
let url = urls[i];
if (url.search ('www.dropbox.com') !== -1) {
if (url.search (/www\.dropbox\.com/u) !== -1) {
url = url.replace ('www.dropbox.com', 'dl.dropbox.com');
let separatorPos = url.indexOf ('?');
if (separatorPos !== -1) {
url = url.substr (0, separatorPos);
}
urls[i] = url;
} else if (url.search ('github.com') !== -1) {
} else if (url.search (/github\.com/u) !== -1) {
url = url.replace ('github.com', 'raw.githubusercontent.com');
url = url.replace ('/blob', '');
let separatorPos = url.indexOf ('?');

View File

@ -27,7 +27,7 @@ OV.IsHoverEnabled = function ()
OV.IsSmallWidth = function ()
{
if (window.matchMedia ('(max-width : 600px)').matches) {
if (window.matchMedia ('(max-width : 700px)').matches) {
return true;
} else {
return false;
@ -36,7 +36,7 @@ OV.IsSmallWidth = function ()
OV.IsSmallHeight = function ()
{
if (window.matchMedia ('(max-height : 600px)').matches) {
if (window.matchMedia ('(max-height : 700px)').matches) {
return true;
} else {
return false;
@ -103,8 +103,9 @@ OV.CopyToClipboard = function (text)
OV.CreateIconButton = function (iconName, hoverIconName, title, link)
{
let buttonLink = $('<a>');
buttonLink.attr ('target', '_blank');
buttonLink.attr ('href', link);
buttonLink.attr ('target', '_blank');
buttonLink.attr ('rel', 'noopener noreferrer');
OV.InstallTooltip (buttonLink, title);
let imgElem = $('<img>').attr ('src', iconName).appendTo (buttonLink);
if (hoverIconName !== null && OV.IsHoverEnabled ()) {

View File

@ -627,7 +627,7 @@ div.ov_menu_info_panel div.ov_info_box_button:hover
}
@media only screen and (max-width: 600px)
@media only screen and (max-width: 700px)
{
.only_full_width